package cn.getech.data.development.service.impl;

import cn.getech.data.development.constant.WorkFlowMenuType;
import cn.getech.data.development.dto.JobInfoDto;
import cn.getech.data.development.dto.JobNodeLayConfigDto;
import cn.getech.data.development.entity.*;
import cn.getech.data.development.entity.flink.*;
import cn.getech.data.development.entity.permission.SysRoleDataPermission;
import cn.getech.data.development.model.dto.*;
import cn.getech.data.development.model.vo.FlinkTaskNodeVO;
import cn.getech.data.development.model.vo.RealTimeTaskVO;
import cn.getech.data.development.service.BeanDataChangeService;
import cn.getech.data.intelligence.common.exception.RRException;
import cn.getech.system.center.utils.ShiroUtils;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;

@Service
public class BeanDataChangeServiceImpl implements BeanDataChangeService {

    @Override
    public VersionZipDto changeJsonToModel(String dataJson, Boolean aflage) {
        if (StringUtils.isEmpty(dataJson)) {
            throw new RRException("版本文件中json文件异常！");
        }
        JSONObject jsonObject = JSONObject.parseObject(dataJson);
        if (null != jsonObject) {
            VersionZipDto versionZipDto = new VersionZipDto();
            versionZipDto.setId(jsonObject.getLong("id"));
            versionZipDto.setVersionName(jsonObject.getString("versionName"));
            versionZipDto.setVersionNum(jsonObject.getString("versionNum"));
            versionZipDto.setCreatePer(jsonObject.getInteger("createPer"));
            versionZipDto.setVersionType(jsonObject.getInteger("versionType"));
            versionZipDto.setProcId(jsonObject.getInteger("procId"));
            versionZipDto.setZipHost(jsonObject.getString("zipHost"));
            versionZipDto.setZipEnv(jsonObject.getString("zipEnv"));
            versionZipDto.setCreatePerName(jsonObject.getString("createPerName"));

            //解析对应的资源文件
            if (aflage) {
                Object udfList = jsonObject.get("udfList");
                if (null != udfList) {
                    List<JobRunUdfDto> jobRunUdfDtos = analyUdfList(udfList);
                    versionZipDto.setUdfList(jobRunUdfDtos);
                }
                Object allUdfList = jsonObject.get("allUdfList");
                if (null != allUdfList) {
                    List<JobRunUdfDto> jobRunUdfDtos = analyUdfList(allUdfList);
                    versionZipDto.setAllUdfList(jobRunUdfDtos);
                }
                Object tableList = jsonObject.get("tableList");
                if (null != tableList) {
                    List<TableInfoAndFieldDto> listTables = analyTable(tableList);
                    versionZipDto.setTableList(listTables);
                }
                Object allTableList = jsonObject.get("allTableList");
                if (null != allTableList) {
                    List<TableInfoAndFieldDto> listTables = analyTable(allTableList);
                    versionZipDto.setAllTableList(listTables);
                }
                Object realTableList = jsonObject.get("realTableList");
                if (null != realTableList) {
                    List<RealTableInfoAndFieldDto> listTables = analyRealTable(realTableList);
                    versionZipDto.setRealTableList(listTables);
                }
                Object allRealTableList = jsonObject.get("allRealTableList");
                if (null != allRealTableList) {
                    List<RealTableInfoAndFieldDto> listTables = analyRealTable(allRealTableList);
                    versionZipDto.setAllRealTableList(listTables);
                }
                Object connectList = jsonObject.get("connectList");
                if (null != connectList) {
                    List<ConfConnectAndConfigDto> confConnectAndConfigDtos = analyConnect(connectList);
                    versionZipDto.setConnectList(confConnectAndConfigDtos);
                }
                Object allConnectList = jsonObject.get("allConnectList");
                if (null != allConnectList) {
                    List<ConfConnectAndConfigDto> confConnectAndConfigDtos = analyConnect(allConnectList);
                    versionZipDto.setAllConnectList(confConnectAndConfigDtos);
                }
                Object workMenuList = jsonObject.get("workMenuList");
                if (null != workMenuList) {
                    List<WorkMenuAndLayDto> workMenuAndLayDtos = analyWorkMenuLists(workMenuList);
                    versionZipDto.setWorkMenuList(workMenuAndLayDtos);
                }
                Object realWorkMenuList = jsonObject.get("realWorkMenuList");
                if (null != realWorkMenuList) {
                    List<RealTimeTaskMenuAndTaskDto> realTimeTaskMenuAndTaskDtos = analyRealWorkMenuLists(realWorkMenuList);
                    versionZipDto.setRealWorkMenuList(realTimeTaskMenuAndTaskDtos);
                }
            }

            return versionZipDto;
        }
        return null;
    }

    @Override
    public CopyAllDataDto analyCopyDataList(String dataJson) {
        if(StringUtils.isNotEmpty(dataJson)){
            CopyAllDataDto copyAllDataDto = new CopyAllDataDto();
            JSONObject jsonObject = JSONObject.parseObject(dataJson);
            if(null != jsonObject){
                Integer procId = jsonObject.getInteger("procId");
                copyAllDataDto.setProcId(procId);
                //权限数据的解析
                Object allPermissions = jsonObject.get("allPermissions");
                if(null != allPermissions){
                    copyAllDataDto.setAllPermissions(anAllPermissions(allPermissions));
                }
                Object allConfConnects = jsonObject.get("allConnectLists");
                if(null != allConfConnects){
                    copyAllDataDto.setAllConnectLists(anAllConfConnects(allConfConnects));
                }
                Object allConnectFields = jsonObject.get("allConnectFieldLists");
                if(null != allConnectFields){
                    copyAllDataDto.setAllConnectFieldLists(analAllConfConnects(allConnectFields));
                }
                Object allProcConnects = jsonObject.get("allProcConnects");
                if(null != allProcConnects){
                    copyAllDataDto.setAllProcConnects(analAllProcConnects(allProcConnects));
                }
                Object allSapConnectFields = jsonObject.get("allSapConnectFieldLists");
                if(null != allSapConnectFields){
                    copyAllDataDto.setAllSapConnectFieldLists(analAllSapConnectFields(allSapConnectFields));
                }

                Object allTableInfos = jsonObject.get("allTableInfoLists");
                if(null != allTableInfos){
                    copyAllDataDto.setAllTableInfoLists(analAllTableInfos(allTableInfos));
                }
                Object allTableFieldInfos = jsonObject.get("allTableFieldInfoLists");
                if(null != allTableFieldInfos){
                    copyAllDataDto.setAllTableFieldInfoLists(analAllTableFieldInfos(allTableFieldInfos));
                }
                Object allRealTableInfos = jsonObject.get("allRealTableInfoLists");
                if(null != allRealTableInfos){
                    copyAllDataDto.setAllRealTableInfoLists(analAllRealTableInfos(allRealTableInfos));
                }
                Object allRealTableFieldInfos = jsonObject.get("allRealTableFieldInfoLists");
                if(null != allRealTableFieldInfos){
                    copyAllDataDto.setAllRealTableFieldInfoLists(analAllRealTableFieldInfos(allRealTableFieldInfos));
                }
                Object allProcTables = jsonObject.get("allProcTables");
                if(null != allProcTables){
                    copyAllDataDto.setAllProcTables(analAllProcTables(allProcTables));
                }

                Object allUdfJarInfos = jsonObject.get("allUdfJarInfos");
                if(null != allUdfJarInfos){
                    copyAllDataDto.setAllUdfJarInfos(analAllUdfJarInfos(allUdfJarInfos));
                }
                Object allJobRunUdfs = jsonObject.get("allJobRunUdfs");
                if(null != allJobRunUdfs){
                    copyAllDataDto.setAllJobRunUdfs(analAllJobRunUdfs(allJobRunUdfs));
                }

                Object allWorkMenus = jsonObject.get("allWorkMenus");
                if(null != allWorkMenus){
                    copyAllDataDto.setAllWorkMenus(analAllWorkMenus(allWorkMenus));
                }
                Object workMenuJobRels = jsonObject.get("allWorkMenuJobRels");
                if(null != workMenuJobRels){
                    copyAllDataDto.setAllWorkMenuJobRels(analAllWorkMenuJobRels(workMenuJobRels));
                }
                Object allWorkFlowDeps = jsonObject.get("allWorkFlowDeps");
                if(null != allWorkFlowDeps){
                    copyAllDataDto.setAllWorkFlowDeps(analAllWorkFlowDeps(allWorkFlowDeps));
                }
                Object allJobLinks = jsonObject.get("allJobLinks");
                if(null != allJobLinks){
                    copyAllDataDto.setAllJobLinks(analAllJobLinks(allJobLinks));
                }
                Object allJobMenusConfs = jsonObject.get("allJobMenusConfs");
                if(null != allJobMenusConfs){
                    copyAllDataDto.setAllJobMenusConfs(analAllJobMenusConfs(allJobMenusConfs));
                }
                Object allJobInfos = jsonObject.get("allJobInfos");
                if(null != allJobInfos){
                    copyAllDataDto.setAllJobInfos(analAllJobInfos(allJobInfos));
                }
                Object allJobNodeInfos = jsonObject.get("allJobNodeInfos");
                if(null != allJobNodeInfos){
                    copyAllDataDto.setAllJobNodeInfos(analAllJobNodeInfos(allJobNodeInfos));
                }
                Object allJobNodeLayCongigs = jsonObject.get("allJobNodeLayCongigs");
                if(null != allJobNodeLayCongigs){
                    copyAllDataDto.setAllJobNodeLayCongigs(analAllJobNodeLayCongigs(allJobNodeLayCongigs));
                }
                Object allJobNodeConfs = jsonObject.get("allJobNodeConfs");
                if(null != allJobNodeConfs){
                    copyAllDataDto.setAllJobNodeConfs(analAllJobMenusConfs(allJobNodeConfs));
                }
                Object alarmObjects = jsonObject.get("alarmObjects");
                if(null != alarmObjects){
                    copyAllDataDto.setAlarmObjects(anaAlarmRules(alarmObjects));
                }
                Object allRealWorkMenus = jsonObject.get("allRealWorkMenus");
                if (null != allRealWorkMenus) {
                    List<RealTimeTaskMenu> realTimeTaskMenuAndTaskDtos = analAllRealWorkMenus(allRealWorkMenus);
                    copyAllDataDto.setAllRealWorkMenus(realTimeTaskMenuAndTaskDtos);
                }
                Object allRealTimeTask = jsonObject.get("allRealTimeTask");
                if (null != allRealTimeTask) {
                    List<RealTimeTask> realTimeTaskMenuAndTaskDtos = analAllRealTimeTask(allRealTimeTask);
                    copyAllDataDto.setAllRealTimeTask(realTimeTaskMenuAndTaskDtos);
                }
                Object allFlinkNodeField = jsonObject.get("allFlinkNodeField");
                if (null != allFlinkNodeField) {
                    List<FlinkNodeField> realTimeTaskMenuAndTaskDtos = analAllFlinkNodeField(allFlinkNodeField);
                    copyAllDataDto.setAllFlinkNodeField(realTimeTaskMenuAndTaskDtos);
                }
                Object allFlinkNodeUnion = jsonObject.get("allFlinkNodeUnion");
                if (null != allFlinkNodeUnion) {
                    List<FlinkNodeUnion> realTimeTaskMenuAndTaskDtos = analAllFlinkNodeUnion(allFlinkNodeUnion);
                    copyAllDataDto.setAllFlinkNodeUnion(realTimeTaskMenuAndTaskDtos);
                }
                Object allFlinkTaskNode = jsonObject.get("allFlinkTaskNode");
                if (null != allFlinkTaskNode) {
                    List<FlinkTaskNode> realTimeTaskMenuAndTaskDtos = analAllFlinkTaskNode(allFlinkTaskNode);
                    copyAllDataDto.setAllFlinkTaskNode(realTimeTaskMenuAndTaskDtos);
                }
                Object taskAlarmObjects = jsonObject.get("taskAlarmObjects");
                if (null != taskAlarmObjects) {
                    List<BdpRealTaskAlarmObject> realTimeTaskMenuAndTaskDtos = analAllTaskObject(taskAlarmObjects);
                    copyAllDataDto.setTaskAlarmObjects(realTimeTaskMenuAndTaskDtos);
                }
            }
            return copyAllDataDto;
        }
        return null;
    }

    private List<SysRoleDataPermission> anAllPermissions(Object allPermissions) {
        List<SysRoleDataPermission> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allPermissions.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    SysRoleDataPermission sysRoleDataPermission = new SysRoleDataPermission();
                    sysRoleDataPermission.setId(jsonObject.getInteger("id"));
                    sysRoleDataPermission.setRoleId(jsonObject.getLong("roleId"));
                    sysRoleDataPermission.setDataId(jsonObject.getInteger("dataId"));
                    sysRoleDataPermission.setDataType(jsonObject.getInteger("dataType"));
                    sysRoleDataPermission.setQuery(jsonObject.getInteger("query"));
                    sysRoleDataPermission.setUpdate(jsonObject.getInteger("update"));
                    sysRoleDataPermission.setDelete(jsonObject.getInteger("delete"));
                    sysRoleDataPermission.setCreate(jsonObject.getInteger("create"));
                    sysRoleDataPermission.setAssign(jsonObject.getInteger("assign"));
                    sysRoleDataPermission.setExport(jsonObject.getInteger("export"));
                    sysRoleDataPermission.setDecrypt(jsonObject.getInteger("decrypt"));
                    sysRoleDataPermission.setUniqueId(jsonObject.getString("uniqueId"));
                    allList.add(sysRoleDataPermission);
                }
            }
        }
        return allList;
    }

    /***
     * 解析数据源连接
     * @param connectList  数据源连接
     * @return
     */
    private List<ConfConnectAndConfigDto> analyConnect(Object connectList) {
        if (null != connectList) {
            JSONArray jsonArray = JSONArray.parseArray(connectList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<ConfConnectAndConfigDto> confConnectAndConfigDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject jsonObject = JSONObject.parseObject(o.toString());
                        if (null != jsonObject) {
                            ConfConnectAndConfigDto confConnectAndConfigDto = new ConfConnectAndConfigDto();
                            Integer id = jsonObject.getInteger("id");
                            String name = jsonObject.getString("name");
                            Integer typeId = jsonObject.getInteger("typeId");
                            String host = jsonObject.getString("host");
                            String interfaceUrl = jsonObject.getString("interfaceUrl");
                            String kafkaUrl = jsonObject.getString("kafkaUrl");
                            String port = jsonObject.getString("port");
                            String username = jsonObject.getString("username");
                            String password = jsonObject.getString("password");
                            String dbname = jsonObject.getString("dbname");
                            String desc = jsonObject.getString("desc");
                            Integer requestType = jsonObject.getInteger("requestType");
                            String topic = jsonObject.getString("topic");
                            String format = jsonObject.getString("format");
                            Integer delimitId = jsonObject.getInteger("delimitId");
                            Integer code = jsonObject.getInteger("code");
                            Date createTime = jsonObject.getDate("createTime");
                            Integer createPer = jsonObject.getInteger("createPer");
                            String createPerName = jsonObject.getString("createPerName");
                            Date modTime = jsonObject.getDate("modTime");
                            Integer modPer = jsonObject.getInteger("modPer");
                            String ftpFileLocation = jsonObject.getString("ftpFileLocation");
                            Object connectFieldInfos = jsonObject.get("connectFieldInfos");
                            Object sapConnectFieldInfo = jsonObject.get("sapConnectFieldInfo");
                            Integer departmentId = jsonObject.getInteger("departmentId");
                            String outputTableName = jsonObject.getString("outputTableName");
                            String targetNameSpace = jsonObject.getString("targetNameSpace");
                            String functionName = jsonObject.getString("functionName");
                            String webServiceUrl = jsonObject.getString("webServiceUrl");
                            Integer connectStatus = jsonObject.getInteger("connectStatus");
                            String metastoreUris = jsonObject.getString("metastoreUris");
                            String cronQueue = jsonObject.getString("cronQueue");
                            String defaultFs = jsonObject.getString("defaultFs");
                            String oracleNtsUrl = jsonObject.getString("oracleNtsUrl");


                            confConnectAndConfigDto.setId(id);
                            confConnectAndConfigDto.setName(name);
                            confConnectAndConfigDto.setTypeId(typeId);
                            confConnectAndConfigDto.setHost(host);
                            confConnectAndConfigDto.setInterfaceUrl(interfaceUrl);
                            confConnectAndConfigDto.setKafkaUrl(kafkaUrl);
                            confConnectAndConfigDto.setPort(port);
                            confConnectAndConfigDto.setUsername(username);
                            confConnectAndConfigDto.setPassword(password);
                            confConnectAndConfigDto.setDbname(dbname);
                            confConnectAndConfigDto.setDesc(desc);
                            confConnectAndConfigDto.setRequestType(requestType);
                            confConnectAndConfigDto.setTopic(topic);
                            confConnectAndConfigDto.setFormat(format);
                            confConnectAndConfigDto.setDelimitId(delimitId);
                            confConnectAndConfigDto.setCode(code);
                            confConnectAndConfigDto.setCreateTime(createTime);
                            confConnectAndConfigDto.setCreatePer(createPer);
                            confConnectAndConfigDto.setCreatePerName(createPerName);
                            confConnectAndConfigDto.setModTime(modTime);
                            confConnectAndConfigDto.setModPer(modPer);
                            confConnectAndConfigDto.setFtpFileLocation(ftpFileLocation);
                            //后面添加的sap-bi
                            confConnectAndConfigDto.setDepartmentId(departmentId);
                            confConnectAndConfigDto.setOutputTableName(outputTableName);
                            confConnectAndConfigDto.setTargetNameSpace(targetNameSpace);
                            confConnectAndConfigDto.setFunctionName(functionName);
                            confConnectAndConfigDto.setWebServiceUrl(webServiceUrl);
                            confConnectAndConfigDto.setConnectStatus(connectStatus);
                            confConnectAndConfigDto.setMetastoreUris(metastoreUris);
                            confConnectAndConfigDto.setCronQueue(cronQueue);
                            confConnectAndConfigDto.setDefaultFs(defaultFs);
                            confConnectAndConfigDto.setOracleNtsUrl(oracleNtsUrl);

                            if (null != connectFieldInfos) {
                                JSONArray jsonArray1 = JSONArray.parseArray(connectFieldInfos.toString());
                                if(CollectionUtil.isNotEmpty(jsonArray1)){
                                    List<ConnectFieldInfo> lists = new ArrayList<>();
                                    for (Object o1 : jsonArray1) {
                                        if(null != o1){
                                            JSONObject obj = JSONObject.parseObject(o1.toString());
                                            if(null != obj){
                                                Integer id1 = obj.getInteger("id");
                                                Integer connectId = obj.getInteger("connectId");
                                                String fieldName = obj.getString("fieldName");
                                                String fieldValue = obj.getString("fieldValue");
                                                String fieldAlias = obj.getString("fieldAlias");
                                                Integer fieldType = obj.getInteger("fieldType");

                                                ConnectFieldInfo connectFieldInfo = new ConnectFieldInfo();
                                                connectFieldInfo.setId(id1);
                                                connectFieldInfo.setConnectId(connectId);
                                                connectFieldInfo.setFieldName(fieldName);
                                                connectFieldInfo.setFieldValue(fieldValue);
                                                connectFieldInfo.setFieldAlias(fieldAlias);
                                                connectFieldInfo.setFieldType(fieldType);

                                                lists.add(connectFieldInfo);
                                            }
                                        }
                                    }
                                    confConnectAndConfigDto.setConnectFieldInfos(lists);
                                }
                            }
                            if (null != sapConnectFieldInfo) {
                                JSONObject obj = JSONObject.parseObject(sapConnectFieldInfo.toString());
                                if (null != obj) {
                                    SapConnectField sapConnectField = new SapConnectField();
                                    Object ainputParams = obj.get("inputParams");
                                    Object aoutputParams = obj.get("outputParams");

                                    sapConnectField.setId(obj.getInteger("id"));
                                    sapConnectField.setConnectId(obj.getInteger("connectId"));
                                    sapConnectField.setRfcFunc(obj.getString("rfcFunc"));
                                    sapConnectField.setInputTableName(obj.getString("inputTableName"));
                                    sapConnectField.setOutputTableName(obj.getString("outputTableName"));
                                    sapConnectField.setIsGroup(obj.getInteger("isGroup"));
                                    sapConnectField.setGroupName(obj.getString("groupName"));
                                    sapConnectField.setR3Name(obj.getString("r3Name"));
                                    sapConnectField.setSysnr(obj.getString("sysnr"));
                                    sapConnectField.setLang(obj.getString("lang"));
                                    if (null != ainputParams) {
                                        JSONArray jsonArray1 = JSONArray.parseArray(ainputParams.toString());
                                        if (CollectionUtil.isNotEmpty(jsonArray1)) {
                                            List<JSONObject> jsonObjects = new ArrayList<>();
                                            for (Object o1 : jsonArray1) {
                                                if (null != o1) {
                                                    JSONObject jsonObject1 = JSONObject.parseObject(o1.toString());
                                                    jsonObjects.add(jsonObject1);
                                                }
                                            }
                                            sapConnectField.setAinputParams(jsonObjects);
                                        }
                                    }

                                    if (null != aoutputParams) {
                                        JSONArray jsonArray1 = JSONArray.parseArray(aoutputParams.toString());
                                        if (CollectionUtil.isNotEmpty(jsonArray1)) {
                                            List<JSONObject> jsonObjects = new ArrayList<>();
                                            for (Object o1 : jsonArray1) {
                                                if (null != o1) {
                                                    JSONObject jsonObject1 = JSONObject.parseObject(o1.toString());
                                                    jsonObjects.add(jsonObject1);
                                                }
                                            }
                                            sapConnectField.setAoutputParams(jsonObjects);
                                        }
                                    }
                                    confConnectAndConfigDto.setSapConnectFieldInfo(sapConnectField);
                                }
                            }
                            confConnectAndConfigDtos.add(confConnectAndConfigDto);
                        }
                    }
                }
                return confConnectAndConfigDtos;
            }
        }
        return null;
    }

    /***
     * 解析数据仓库
     * @param tableList 数据仓库集合
     * @return
     */
    private List<TableInfoAndFieldDto> analyTable(Object tableList) {
        if (null != tableList) {
            JSONArray jsonArray = JSONArray.parseArray(tableList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<TableInfoAndFieldDto> tableInfoAndFieldDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject jsonObject = JSONObject.parseObject(o.toString());
                        if (null != jsonObject) {
                            TableInfoAndFieldDto tableInfoAndFieldDto = new TableInfoAndFieldDto();
                            Integer id = jsonObject.getInteger("id");
                            String dbName = jsonObject.getString("dbName");
                            String tableName = jsonObject.getString("tableName");
                            String tableAlias = jsonObject.getString("tableAlias");
                            String format = jsonObject.getString("format");
                            Integer delimitId = jsonObject.getInteger("delimitId");
                            String desc = jsonObject.getString("desc");
                            Integer createPer = jsonObject.getInteger("createPer");
                            Date createTime = jsonObject.getDate("createTime");
                            Date updateTime = jsonObject.getDate("updateTime");
                            Integer tableLevelId = jsonObject.getInteger("tableLevelId");
                            Long rowsNum = jsonObject.getLong("rowsNum");
                            Double totalSize = jsonObject.getDouble("totalSize");
                            Date lastCountTime = jsonObject.getDate("lastCountTime");
                            Integer tableMaskOpen = jsonObject.getInteger("tableMaskOpen");
                            String tableMaskWhiteList = jsonObject.getString("tableMaskWhiteList");
                            Object tableFieldInfos = jsonObject.get("tableFieldInfos");
                            String createPerName = jsonObject.getString("createPerName");
                            String securityDataLevel = jsonObject.getString("securityDataLevel");
                            Integer storeEngine = jsonObject.getInteger("storeEngine");
                            Integer lifeCycle = jsonObject.getInteger("lifeCycle");
                            Integer longLifeFlag = jsonObject.getInteger("longLifeFlag");

                            tableInfoAndFieldDto.setId(id);
                            tableInfoAndFieldDto.setDbName(dbName);
                            tableInfoAndFieldDto.setTableName(tableName);
                            tableInfoAndFieldDto.setTableAlias(tableAlias);
                            tableInfoAndFieldDto.setFormat(format);
                            tableInfoAndFieldDto.setDelimitId(delimitId);
                            tableInfoAndFieldDto.setDesc(desc);
                            tableInfoAndFieldDto.setCreatePer(createPer);
                            tableInfoAndFieldDto.setCreatePerName(createPerName);
                            tableInfoAndFieldDto.setCreateTime(createTime);
                            tableInfoAndFieldDto.setTableLevelId(tableLevelId);
                            tableInfoAndFieldDto.setRowsNum(rowsNum);
                            tableInfoAndFieldDto.setTotalSize(totalSize);
                            tableInfoAndFieldDto.setLastCountTime(lastCountTime);
                            tableInfoAndFieldDto.setTableMaskOpen(tableMaskOpen);
                            tableInfoAndFieldDto.setTableMaskWhiteList(tableMaskWhiteList);
                            tableInfoAndFieldDto.setSecurityDataLevel(securityDataLevel);
                            tableInfoAndFieldDto.setStoreEngine(storeEngine);
                            tableInfoAndFieldDto.setLifeCycle(lifeCycle);
                            tableInfoAndFieldDto.setLongLifeFlag(longLifeFlag);
                            tableInfoAndFieldDto.setUpdateTime(updateTime);

                            if (null != tableFieldInfos) {
                                JSONArray jsonArray1 = JSONArray.parseArray(tableFieldInfos.toString());
                                if (CollectionUtil.isNotEmpty(jsonArray1)) {
                                    List<TableFieldInfo> tableFieldInfos1 = new ArrayList<>();
                                    for (Object o1 : jsonArray1) {
                                        if (null != o1) {
                                            JSONObject jsonObject1 = JSONObject.parseObject(o1.toString());
                                            if (null != jsonObject1) {
                                                TableFieldInfo tableFieldInfo = new TableFieldInfo();
                                                Integer id1 = jsonObject1.getInteger("id");
                                                Integer tableId = jsonObject1.getInteger("tableId");
                                                String fieldName = jsonObject1.getString("fieldName");
                                                String fieldType = jsonObject1.getString("fieldType");
                                                String fieldAlias = jsonObject1.getString("fieldAlias");
                                                Integer isPartition = jsonObject1.getInteger("isPartition");
                                                Integer fieldOrder = jsonObject1.getInteger("fieldOrder");
                                                Integer colcumLevelId = jsonObject1.getInteger("colcumLevelId");
                                                Integer encyStyleId = jsonObject1.getInteger("encyStyleId");
                                                String securityDataLevel1 = jsonObject1.getString("securityDataLevel");
                                                Integer createPer1 = jsonObject1.getInteger("createPer");
                                                Date createTime1 = jsonObject1.getDate("createTime");
                                                Integer primaryKey = jsonObject1.getInteger("primaryKey");

                                                tableFieldInfo.setId(id1);
                                                tableFieldInfo.setTableId(tableId);
                                                tableFieldInfo.setFieldName(fieldName);
                                                tableFieldInfo.setFieldType(fieldType);
                                                tableFieldInfo.setFieldAlias(fieldAlias);
                                                tableFieldInfo.setIsPartition(isPartition);
                                                tableFieldInfo.setFieldOrder(fieldOrder);
                                                tableFieldInfo.setColcumLevelId(colcumLevelId);
                                                tableFieldInfo.setEncyStyleId(encyStyleId);
                                                tableFieldInfo.setSecurityDataLevel(securityDataLevel1);
                                                tableFieldInfo.setCreatePer(createPer1);
                                                tableFieldInfo.setTenantId(ShiroUtils.getTenantId());
                                                tableFieldInfo.setCreateTime(createTime1);
                                                tableFieldInfo.setPrimaryKey(primaryKey);
                                                tableFieldInfos1.add(tableFieldInfo);
                                            }
                                        }
                                    }
                                    tableInfoAndFieldDto.setTableFieldInfos(tableFieldInfos1);
                                }
                            }
                            tableInfoAndFieldDtos.add(tableInfoAndFieldDto);
                        }
                    }
                }
                return tableInfoAndFieldDtos;
            }
        }
        return null;
    }

    /***
     * 解析数据仓库
     * @param realTableList 数据仓库集合
     * @return
     */
    private List<RealTableInfoAndFieldDto> analyRealTable(Object realTableList) {
        if (null != realTableList) {
            JSONArray jsonArray = JSONArray.parseArray(realTableList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<RealTableInfoAndFieldDto> tableInfoAndFieldDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject jsonObject = JSONObject.parseObject(o.toString());
                        if (null != jsonObject) {
                            RealTableInfoAndFieldDto tableInfoAndFieldDto = new RealTableInfoAndFieldDto();
                            Integer id = jsonObject.getInteger("id");
                            Integer resourceId = jsonObject.getInteger("resourceId");
                            String tableName = jsonObject.getString("tableName");
                            String dbName = jsonObject.getString("dbName");
                            String topicName = jsonObject.getString("topicName");
                            Integer delimitId = jsonObject.getInteger("delimitId");
                            String format = jsonObject.getString("format");
                            String tableDesc = jsonObject.getString("tableDesc");
                            String config = jsonObject.getString("config");
                            Integer viewNum = jsonObject.getInteger("viewNum");
                            Date createTime = jsonObject.getDate("createTime");
                            Long createUser = jsonObject.getLong("createUser");
                            Long updateUser = jsonObject.getLong("updateUser");
                            Date updateTime = jsonObject.getDate("updateTime");
                            Integer deleteFlag = jsonObject.getInteger("deleteFlag");
                            Integer tableType = jsonObject.getInteger("tableType");
                            Integer partitionFlag = jsonObject.getInteger("partitionFlag");
                            Integer partitionNum = jsonObject.getInteger("partitionNum");
                            Short duplicateNum = jsonObject.getShort("duplicateNum");
                            String securityDataLevel = jsonObject.getString("securityDataLevel");
                            Integer tableLevelId = jsonObject.getInteger("tableLevelId");
                            String createPerName = jsonObject.getString("createPerName");
                            Object tableFieldInfos = jsonObject.get("tableFieldInfos");

                            tableInfoAndFieldDto.setId(id);
                            tableInfoAndFieldDto.setResourceId(resourceId);
                            tableInfoAndFieldDto.setTableName(tableName);
                            tableInfoAndFieldDto.setDbName(dbName);
                            tableInfoAndFieldDto.setTopicName(topicName);
                            tableInfoAndFieldDto.setDelimitId(delimitId);
                            tableInfoAndFieldDto.setFormat(format);
                            tableInfoAndFieldDto.setTableDesc(tableDesc);
                            tableInfoAndFieldDto.setConfig(config);
                            tableInfoAndFieldDto.setViewNum(viewNum);
                            tableInfoAndFieldDto.setCreateTime(createTime);
                            tableInfoAndFieldDto.setCreateUser(createUser);
                            tableInfoAndFieldDto.setUpdateUser(updateUser);
                            tableInfoAndFieldDto.setUpdateTime(updateTime);
                            tableInfoAndFieldDto.setDeleteFlag(deleteFlag);
                            tableInfoAndFieldDto.setTableType(tableType);
                            tableInfoAndFieldDto.setPartitionFlag(partitionFlag);
                            tableInfoAndFieldDto.setPartitionNum(partitionNum);
                            tableInfoAndFieldDto.setDuplicateNum(duplicateNum);
                            tableInfoAndFieldDto.setSecurityDataLevel(securityDataLevel);
                            tableInfoAndFieldDto.setTableLevelId(tableLevelId);
                            tableInfoAndFieldDto.setTenantId(ShiroUtils.getTenantId());
                            tableInfoAndFieldDto.setCreatePerName(createPerName);

                            if (null != tableFieldInfos) {
                                JSONArray jsonArray1 = JSONArray.parseArray(tableFieldInfos.toString());
                                if (CollectionUtil.isNotEmpty(jsonArray1)) {
                                    List<BdpRealTableField> tableFieldInfos1 = new ArrayList<>();
                                    for (Object o1 : jsonArray1) {
                                        if (null != o1) {
                                            JSONObject jsonObject1 = JSONObject.parseObject(o1.toString());
                                            if (null != jsonObject1) {
                                                BdpRealTableField tableFieldInfo = new BdpRealTableField();
                                                Integer id1 = jsonObject1.getInteger("id");
                                                Integer tableId = jsonObject1.getInteger("tableId");
                                                String fieldName = jsonObject1.getString("fieldName");
                                                String fieldType = jsonObject1.getString("fieldType");
                                                String fieldTypeValue = jsonObject1.getString("fieldTypeValue");
                                                String fieldAlias = jsonObject1.getString("fieldAlias");
                                                String fieldDesc = jsonObject1.getString("fieldDesc");
                                                Integer fieldOrder = jsonObject1.getInteger("fieldOrder");
                                                Date createTime1 = jsonObject1.getDate("createTime");
                                                Long createUser1 = jsonObject1.getLong("createUser");
                                                Integer colcumLevelId = jsonObject1.getInteger("colcumLevelId");
                                                String securityDataLevel1 = jsonObject1.getString("securityDataLevel");
                                                Integer deleteFlag1 = jsonObject1.getInteger("deleteFlag");

                                                tableFieldInfo.setId(id1);
                                                tableFieldInfo.setTableId(tableId);
                                                tableFieldInfo.setFieldName(fieldName);
                                                tableFieldInfo.setFieldType(fieldType);
                                                tableFieldInfo.setFieldTypeValue(fieldTypeValue);
                                                tableFieldInfo.setFieldAlias(fieldAlias);
                                                tableFieldInfo.setFieldDesc(fieldDesc);
                                                tableFieldInfo.setFieldOrder(fieldOrder);
                                                tableFieldInfo.setColcumLevelId(colcumLevelId);
                                                tableFieldInfo.setSecurityDataLevel(securityDataLevel1);
                                                tableFieldInfo.setCreateUser(createUser1);
                                                tableFieldInfo.setCreateTime(createTime1);
                                                tableFieldInfo.setTenantId(ShiroUtils.getTenantId());
                                                tableFieldInfo.setDeleteFlag(deleteFlag1);
                                                tableFieldInfos1.add(tableFieldInfo);
                                            }
                                        }
                                    }
                                    tableInfoAndFieldDto.setTableFieldInfos(tableFieldInfos1);
                                }
                            }
                            tableInfoAndFieldDtos.add(tableInfoAndFieldDto);
                        }
                    }
                }
                return tableInfoAndFieldDtos;
            }
        }
        return null;
    }

    /***
     * 解析udf函数
     * @param udfList udf函数集合
     * @return
     */
    private List<JobRunUdfDto> analyUdfList(Object udfList) {
        if (null != udfList) {
            JSONArray jsonArray = JSONArray.parseArray(udfList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<JobRunUdfDto> jobRunUdfDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject jsonObject = JSONObject.parseObject(o.toString());
                        if (null != jsonObject) {
                            JobRunUdfDto jobRunUdfDto = new JobRunUdfDto();
                            Integer id = jsonObject.getInteger("id");
                            String jarName = jsonObject.getString("jarName");
                            String jarClassName = jsonObject.getString("jarClassName");
                            String jarMethodName = jsonObject.getString("jarMethodName");
                            String methodName = jsonObject.getString("methodName");
                            String dbName = jsonObject.getString("dbName");
                            Integer isAlreadyRegist = jsonObject.getInteger("isAlreadyRegist");
                            Integer isJarDelete = jsonObject.getInteger("isJarDelete");
                            Integer createrPerId = jsonObject.getInteger("createrPerId");
                            String createPerName = jsonObject.getString("createPerName");
                            Object createTime = jsonObject.get("createTime");
                            Integer procId = jsonObject.getInteger("procId");

                            jobRunUdfDto.setId(id);
                            jobRunUdfDto.setJarName(jarName);
                            jobRunUdfDto.setJarClassName(jarClassName);
                            jobRunUdfDto.setJarMethodName(jarMethodName);
                            jobRunUdfDto.setMethodName(methodName);
                            jobRunUdfDto.setDbName(dbName);
                            jobRunUdfDto.setIsAlreadyRegist(isAlreadyRegist);
                            jobRunUdfDto.setIsJarDelete(isJarDelete);
                            jobRunUdfDto.setCreaterPerId(createrPerId);
                            jobRunUdfDto.setCreatePerName(createPerName);
                            jobRunUdfDto.setProcId(procId);
                            if (null != createTime) {
                                jobRunUdfDto.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }
                            jobRunUdfDtos.add(jobRunUdfDto);

                        }
                    }
                }
                return jobRunUdfDtos;
            }
        }
        return null;
    }

    /***
     * 解析工作流和工作流依赖的json资源文件
     * @param workMenuList
     * @return
     */
    private List<WorkMenuAndLayDto> analyWorkMenuLists(Object workMenuList) {
        if (null != workMenuList) {
            JSONArray workMenuArrays = JSONArray.parseArray(workMenuList.toString());
            if (CollectionUtil.isNotEmpty(workMenuArrays)) {
                List<WorkMenuAndLayDto> resWorkMenuAndLayDtos = new ArrayList<>();
                for (Object workMenuArray : workMenuArrays) {
                    if (null != workMenuArray) {
                        JSONObject jsonObject = JSONObject.parseObject(workMenuArray.toString());
                        if (null != jsonObject) {
                            WorkMenuAndLayDto workMenuAndLayDto = new WorkMenuAndLayDto();

                            Long id = jsonObject.getLong("id");
                            Integer procId = jsonObject.getInteger("procId");
                            Long parentId = jsonObject.getLong("parentId");
                            Integer workType = jsonObject.getInteger("workType");
                            Long rootId = jsonObject.getLong("rootId");
                            String name = jsonObject.getString("name");
                            String descName = jsonObject.getString("descName");
                            Object createTime = jsonObject.get("createTime");
                            Integer createPer = jsonObject.getInteger("createPer");
                            String createPerName = jsonObject.getString("createPerName");

                            workMenuAndLayDto.setId(id);
                            workMenuAndLayDto.setProcId(procId);
                            workMenuAndLayDto.setParentId(parentId);
                            workMenuAndLayDto.setWorkType(workType);
                            workMenuAndLayDto.setRootId(rootId);
                            workMenuAndLayDto.setName(name);
                            workMenuAndLayDto.setDescName(descName);
                            workMenuAndLayDto.setCreatePer(createPer);
                            workMenuAndLayDto.setCreatePerName(createPerName);
                            if (null != createTime) {
                                workMenuAndLayDto.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }

                            if (Objects.equals(workType, WorkFlowMenuType.WORKFLOW_FIELD.getCode())) {
                                //作业流
                                Object jobInfoDto = jsonObject.get("jobInfoDto");
                                if (null != jobInfoDto) {
                                    JSONObject objJobInfoDto = JSONObject.parseObject(jobInfoDto.toString());
                                    if (null != objJobInfoDto) {
                                        JobInfoDto jobInfoDto1 = changeJobInfoDto(objJobInfoDto);
                                        workMenuAndLayDto.setJobInfoDto(jobInfoDto1);
                                    }
                                }

                                //作业流路由
                                Object jobNodeConfig = jsonObject.get("jobNodeConfig");
                                if (null != jobNodeConfig) {
                                    JSONObject objJobNodeConfig = JSONObject.parseObject(jobNodeConfig.toString());
                                    if (null != objJobNodeConfig) {
                                        JobNodeConfig jobNodeConfig1 = changeJobNodeConfig(objJobNodeConfig);
                                        workMenuAndLayDto.setJobNodeConfig(jobNodeConfig1);
                                    }
                                }

                                //报警规则
                                Object alarmObjects = jsonObject.get("alarmObjects");
                                if(null != alarmObjects){
                                    List<AlarmObject> alarmObjects1 = anaAlarmRules(alarmObjects);
                                    if(CollectionUtil.isNotEmpty(alarmObjects1)){
                                        workMenuAndLayDto.setAlarmObjects(alarmObjects1);
                                    }
                                }


                                //质量报警规则
                                Object managerRulesRelDtos = jsonObject.get("managerRulesRelDtos");
                                if(null != managerRulesRelDtos){
                                    JSONArray jsonArray = JSONArray.parseArray(managerRulesRelDtos.toString());
                                    if(CollectionUtil.isNotEmpty(jsonArray)){
                                        List<DataManagerQualityRulesRelDto> restRules = new ArrayList<>();
                                        for (Object o : jsonArray) {
                                            if(null != o){
                                                JSONObject objs = JSONObject.parseObject(o.toString());
                                                if(null != objs){
                                                    DataManagerQualityRulesRelDto dataManagerQualityRulesRelDto = new DataManagerQualityRulesRelDto();
                                                    dataManagerQualityRulesRelDto.setId(objs.getInteger("id"));
                                                    dataManagerQualityRulesRelDto.setRuleId(objs.getInteger("ruleId"));
                                                    dataManagerQualityRulesRelDto.setJobNodeId(objs.getInteger("jobNodeId"));
                                                    dataManagerQualityRulesRelDto.setJobId(objs.getInteger("jobId"));
                                                    restRules.add(dataManagerQualityRulesRelDto);
                                                }
                                            }
                                        }
                                        if(CollectionUtil.isNotEmpty(restRules)){
                                            workMenuAndLayDto.setManagerRulesRelDtos(restRules);
                                        }
                                    }
                                }
                            }
                            if (Objects.equals(workType, WorkFlowMenuType.WORKFLOW_MGT_FIELD.getCode())) {
                                //作业流依赖
                                Object jobNodeConfig = jsonObject.get("jobNodeConfig");
                                if (null != jobNodeConfig) {
                                    JSONObject objJobNodeConfig = JSONObject.parseObject(jobNodeConfig.toString());
                                    if (null != objJobNodeConfig) {
                                        JobNodeConfig jobNodeConfig1 = changeJobNodeConfig(objJobNodeConfig);
                                        workMenuAndLayDto.setJobNodeConfig(jobNodeConfig1);
                                    }
                                }
                                Object workFlowDepDto = jsonObject.get("workFlowDepDto");
                                if (null != workFlowDepDto) {
                                    JSONObject objWorkFlowDepDto = JSONObject.parseObject(workFlowDepDto.toString());
                                    if (null != objWorkFlowDepDto) {
                                        WorkFlowDepDto workFlowDepDto1 = changeWorkFlowDepDto(objWorkFlowDepDto);
                                        workMenuAndLayDto.setWorkFlowDepDto(workFlowDepDto1);
                                    }
                                }
                            }
                            if (Objects.equals(workType, WorkFlowMenuType.WORKFLOW_FIELD.getCode())
                                    || Objects.equals(workType, WorkFlowMenuType.WORKFLOW_MGT_FIELD.getCode())) {

                                Object jobLinks = jsonObject.get("jobLinks");
                                if (null != jobLinks) {
                                    JSONArray jsonArrayJobLinks = JSONArray.parseArray(jobLinks.toString());
                                    if (CollectionUtil.isNotEmpty(jsonArrayJobLinks)) {
                                        List<JobLink> restJobLinks = new ArrayList<>();
                                        for (Object jsonArrayJobLink : jsonArrayJobLinks) {
                                            if (null != jsonArrayJobLink) {
                                                JSONObject objJobLink = JSONObject.parseObject(jsonArrayJobLink.toString());
                                                if (null != objJobLink) {
                                                    JobLink jobLink = analyJobLink(objJobLink);
                                                    restJobLinks.add(jobLink);
                                                }
                                            }
                                        }
                                        workMenuAndLayDto.setJobLinks(restJobLinks);
                                    }
                                }

                                Object workMenuJobRels = jsonObject.get("workMenuJobRels");
                                if (null != workMenuJobRels) {
                                    JSONArray jsonArrayWorkMenuRels = JSONArray.parseArray(workMenuJobRels.toString());
                                    if (CollectionUtil.isNotEmpty(jsonArrayWorkMenuRels)) {
                                        List<WorkMenuJobRel> restWorkMenuRels = new ArrayList<>();
                                        for (Object jsonArrayWorkMenuRel : jsonArrayWorkMenuRels) {
                                            if (null != jsonArrayWorkMenuRel) {
                                                JSONObject jsonObject1 = JSONObject.parseObject(jsonArrayWorkMenuRel.toString());
                                                if (null != jsonObject1) {
                                                    WorkMenuJobRel workMenuJobRel1 = analyWorkMenuJob(jsonObject1);
                                                    restWorkMenuRels.add(workMenuJobRel1);
                                                }
                                            }
                                        }
                                        workMenuAndLayDto.setWorkMenuJobRels(restWorkMenuRels);
                                    }
                                }
                            }
                            resWorkMenuAndLayDtos.add(workMenuAndLayDto);
                        }
                    }
                }
                return resWorkMenuAndLayDtos;
            }
        }
        return null;
    }

    /***
     * 解析工作流和工作流依赖的json资源文件
     * @param workMenuList
     * @return
     */
    private List<RealTimeTaskMenuAndTaskDto> analyRealWorkMenuLists(Object workMenuList) {
        if (null != workMenuList) {
            JSONArray workMenuArrays = JSONArray.parseArray(workMenuList.toString());
            if (CollectionUtil.isNotEmpty(workMenuArrays)) {
                List<RealTimeTaskMenuAndTaskDto> resWorkMenuAndLayDtos = new ArrayList<>();
                for (Object workMenuArray : workMenuArrays) {
                    if (null != workMenuArray) {
                        JSONObject jsonObject = JSONObject.parseObject(workMenuArray.toString());
                        if (null != jsonObject) {
                            RealTimeTaskMenuAndTaskDto workMenuAndLayDto = new RealTimeTaskMenuAndTaskDto();

                            Integer id = jsonObject.getInteger("id");
                            Integer procId = jsonObject.getInteger("procId");
                            Integer parentId = jsonObject.getInteger("parentId");
                            Integer menuType = jsonObject.getInteger("menuType");
                            String name = jsonObject.getString("name");
                            Integer level = jsonObject.getInteger("level");
                            String description = jsonObject.getString("description");
                            Integer state = jsonObject.getInteger("state");
                            Object createTime = jsonObject.get("createTime");
                            Integer createPer = jsonObject.getInteger("createPer");
                            String createPerName = jsonObject.getString("createPerName");

                            workMenuAndLayDto.setId(id);
                            workMenuAndLayDto.setProcId(procId);
                            workMenuAndLayDto.setParentId(parentId);
                            workMenuAndLayDto.setMenuType(menuType);
                            workMenuAndLayDto.setName(name);
                            workMenuAndLayDto.setLevel(level);
                            workMenuAndLayDto.setDescription(description);
                            workMenuAndLayDto.setState(state);
                            workMenuAndLayDto.setCreatePer(createPer);
                            workMenuAndLayDto.setCreatePerName(createPerName);
                            if (null != createTime) {
                                workMenuAndLayDto.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }

                            if (Objects.equals(menuType,2)) {
                                //实时任务工作流
                                Object realTimeTaskVO = jsonObject.get("realTimeTaskVO");
                                if (null != realTimeTaskVO) {
                                    JSONObject objJobInfoDto = JSONObject.parseObject(realTimeTaskVO.toString());
                                    if (null != objJobInfoDto) {
                                        RealTimeTaskVO realTimeTaskVO1 = changeRealTimeTaskVO(objJobInfoDto);
                                        workMenuAndLayDto.setRealTimeTaskVO(realTimeTaskVO1);
                                    }
                                }

                                //作业流路由
                                Object lineList = jsonObject.get("lineList");
                                if (null != lineList) {
                                    List<FlinkNodeUnion> lineList1 = anaFlinkNodeUnion(lineList);
                                    if(CollectionUtil.isNotEmpty(lineList1)){
                                        workMenuAndLayDto.setLineList(lineList1);
                                    }
                                }

                                //报警规则
                                Object alarmObjects = jsonObject.get("alarmObjects");
                                if(null != alarmObjects){
                                    List<BdpRealTaskAlarmObject> alarmObjects1 = anaRealAlarmRules(alarmObjects);
                                    if(CollectionUtil.isNotEmpty(alarmObjects1)){
                                        workMenuAndLayDto.setAlarmObjects(alarmObjects1);
                                    }
                                }

                            }

                            resWorkMenuAndLayDtos.add(workMenuAndLayDto);
                        }
                    }
                }
                return resWorkMenuAndLayDtos;
            }
        }
        return null;
    }

    private List<AlarmObject> anaAlarmRules(Object alarmObjects) {
        JSONArray jsonArray = JSONArray.parseArray(alarmObjects.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            List<AlarmObject> restRules = new ArrayList<>();
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objs = JSONObject.parseObject(o.toString());
                    if(null != objs){
                        AlarmObject alarmObject = new AlarmObject();
                        alarmObject.setId(objs.getInteger("id"));
                        alarmObject.setAlarmId(objs.getInteger("alarmId"));
                        alarmObject.setObjectType(objs.getInteger("objectType"));
                        alarmObject.setObjectId(objs.getInteger("objectId"));
                        alarmObject.setObjectName(objs.getString("objectName"));
                        restRules.add(alarmObject);
                    }
                }
            }
            if(CollectionUtil.isNotEmpty(restRules)){
                return restRules;
            }
        }
        return null;
    }

    private List<BdpRealTaskAlarmObject> anaRealAlarmRules(Object alarmObjects) {
        JSONArray jsonArray = JSONArray.parseArray(alarmObjects.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            List<BdpRealTaskAlarmObject> restRules = new ArrayList<>();
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objs = JSONObject.parseObject(o.toString());
                    if(null != objs){
                        BdpRealTaskAlarmObject alarmObject = new BdpRealTaskAlarmObject();
                        alarmObject.setId(objs.getInteger("id"));
                        alarmObject.setAlarmId(objs.getInteger("alarmId"));
                        alarmObject.setObjectType(objs.getInteger("objectType"));
                        alarmObject.setObjectId(objs.getInteger("objectId"));
                        alarmObject.setObjectName(objs.getString("objectName"));
                        restRules.add(alarmObject);
                    }
                }
            }
            if(CollectionUtil.isNotEmpty(restRules)){
                return restRules;
            }
        }
        return null;
    }

    private List<FlinkNodeUnion> anaFlinkNodeUnion(Object alarmObjects) {
        JSONArray jsonArray = JSONArray.parseArray(alarmObjects.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            List<FlinkNodeUnion> restRules = new ArrayList<>();
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objs = JSONObject.parseObject(o.toString());
                    if(null != objs){
                        FlinkNodeUnion alarmObject = new FlinkNodeUnion();
                        alarmObject.setTaskId(objs.getInteger("taskId"));
                        alarmObject.setNodeFrom(objs.getInteger("nodeFrom"));
                        alarmObject.setNodeTo(objs.getInteger("nodeTo"));
                        alarmObject.setWebFrom(objs.getString("webFrom"));
                        alarmObject.setWebTo(objs.getString("webTo"));
                        restRules.add(alarmObject);
                    }
                }
            }
            if(CollectionUtil.isNotEmpty(restRules)){
                return restRules;
            }
        }
        return null;
    }

    private JobInfoDto changeJobInfoDto(JSONObject objJobInfoDto) {
        JobInfoDto jobInfoDto = new JobInfoDto();
        Integer id = objJobInfoDto.getInteger("id");
        Long realId = objJobInfoDto.getLong("realId");
        String workFlowNodeName = objJobInfoDto.getString("workFlowNodeName");
        String name = objJobInfoDto.getString("name");
        String desc = objJobInfoDto.getString("desc");
        Date createTime = objJobInfoDto.getDate("createTime");
        Integer createPer = objJobInfoDto.getInteger("createPer");
        String createPerName = objJobInfoDto.getString("createPerName");
        Date modTime = objJobInfoDto.getDate("modTime");
        Integer modPer = objJobInfoDto.getInteger("modPer");
        Integer lastRunState = objJobInfoDto.getInteger("lastRunState");
        Date lastRunTime = objJobInfoDto.getDate("lastRunTime");
        Long lastRunCost = objJobInfoDto.getLong("lastRunCost");
        Integer lastRunNum = objJobInfoDto.getInteger("lastRunNum");
        Long successCount = objJobInfoDto.getLong("successCount");
        Long failCount = objJobInfoDto.getLong("failCount");
        String failMailAddress = objJobInfoDto.getString("failMailAddress");
        Integer procId = objJobInfoDto.getInteger("procId");
        String param = objJobInfoDto.getString("param");
        String lastOozieJobId = objJobInfoDto.getString("lastOozieJobId");
        String lastCorOozieJobId = objJobInfoDto.getString("lastCorOozieJobId");
        Integer successNum = objJobInfoDto.getInteger("successNum");
        Integer failedNum = objJobInfoDto.getInteger("failedNum");
        Double posX = objJobInfoDto.getDouble("posX");
        Double posY = objJobInfoDto.getDouble("posY");
        Integer workflowType = objJobInfoDto.getInteger("workflowType");
        Object jobNodeInfos = objJobInfoDto.get("jobNodeInfos");

        jobInfoDto.setId(id);
        jobInfoDto.setRealId(realId);
        jobInfoDto.setWorkFlowNodeName(workFlowNodeName);
        jobInfoDto.setName(name);
        jobInfoDto.setDesc(desc);
        jobInfoDto.setCreateTime(createTime);
        jobInfoDto.setCreatePer(createPer);
        jobInfoDto.setCreatePerName(createPerName);
        jobInfoDto.setModTime(modTime);
        jobInfoDto.setModPer(modPer);
        jobInfoDto.setLastRunState(lastRunState);
        jobInfoDto.setLastRunTime(lastRunTime);
        jobInfoDto.setLastRunCost(lastRunCost);
        jobInfoDto.setLastRunNum(lastRunNum);
        jobInfoDto.setSuccessCount(successCount);
        jobInfoDto.setFailCount(failCount);
        jobInfoDto.setFailMailAddress(failMailAddress);
        jobInfoDto.setProcId(procId);
        jobInfoDto.setParam(param);
        jobInfoDto.setLastOozieJobId(lastOozieJobId);
        jobInfoDto.setLastCorOozieJobId(lastCorOozieJobId);
        jobInfoDto.setSuccessNum(successNum);
        jobInfoDto.setFailedNum(failedNum);
        jobInfoDto.setPosX(posX);
        jobInfoDto.setPosY(posY);
        jobInfoDto.setWorkflowType(workflowType);
        //节点信息
        if (null != jobNodeInfos) {
            JSONArray jsonArray = JSONArray.parseArray(jobNodeInfos.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<JobNodeInfo> jobNodeInfos1 = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject objJobNode = JSONObject.parseObject(o.toString());
                        if (null != objJobNode) {
                            JobNodeInfo jobNode = analyJobNode(objJobNode);
                            jobNodeInfos1.add(jobNode);
                        }
                    }
                }
                jobInfoDto.setJobNodeInfos(jobNodeInfos1);
            }
        }
        return jobInfoDto;
    }

    private RealTimeTaskVO changeRealTimeTaskVO(JSONObject objJobInfoDto) {
        RealTimeTaskVO jobInfoDto = new RealTimeTaskVO();
        Integer id = objJobInfoDto.getInteger("id");
        Integer menuId = objJobInfoDto.getInteger("menuId");
        String taskName = objJobInfoDto.getString("taskName");
        Integer taskType = objJobInfoDto.getInteger("taskType");
        Integer resourceId = objJobInfoDto.getInteger("resourceId");
        String resourceName = objJobInfoDto.getString("resourceName");
        String mainFunction = objJobInfoDto.getString("mainFunction");
        String mainArgs = objJobInfoDto.getString("mainArgs");
        Integer parallelism = objJobInfoDto.getInteger("parallelism");
        Integer jobManagerMemory = objJobInfoDto.getInteger("jobManagerMemory");
        Integer taskManagerMemory = objJobInfoDto.getInteger("taskManagerMemory");
        Integer taskManagerCount = objJobInfoDto.getInteger("taskManagerCount");
        Integer slot = objJobInfoDto.getInteger("slot");
        String savepointPath = objJobInfoDto.getString("savepointPath");
        Integer runState = objJobInfoDto.getInteger("runState");
        Integer lockState = objJobInfoDto.getInteger("lockState");
        String applicationId = objJobInfoDto.getString("applicationId");
        String jobId = objJobInfoDto.getString("jobId");
        Date runTime = objJobInfoDto.getDate("runTime");
        String flinkSQL = objJobInfoDto.getString("flinkSQL");
        String allSql = objJobInfoDto.getString("allSql");
        JSONObject config = objJobInfoDto.getJSONObject("config");
        Long procId = objJobInfoDto.getLong("procId");
        String jarUploadUser = objJobInfoDto.getString("jarUploadUser");
        Date uploadTime = objJobInfoDto.getDate("uploadTime");
        Integer runLogId = objJobInfoDto.getInteger("runLogId");
        String queenName = objJobInfoDto.getString("queenName");
        Object nodeList = objJobInfoDto.get("nodeList");

        jobInfoDto.setId(id);
        jobInfoDto.setProcId(procId);
        jobInfoDto.setMenuId(menuId);
        jobInfoDto.setTaskName(taskName);
        jobInfoDto.setTaskType(taskType);
        jobInfoDto.setResourceId(resourceId);
        jobInfoDto.setResourceName(resourceName);
        jobInfoDto.setMainFunction(mainFunction);
        jobInfoDto.setMainArgs(mainArgs);
        jobInfoDto.setParallelism(parallelism);
        jobInfoDto.setJobManagerMemory(jobManagerMemory);
        jobInfoDto.setTaskManagerCount(taskManagerCount);
        jobInfoDto.setTaskManagerMemory(taskManagerMemory);
        jobInfoDto.setSlot(slot);
        jobInfoDto.setSavepointPath(savepointPath);
        jobInfoDto.setRunState(runState);
        jobInfoDto.setLockState(lockState);
        jobInfoDto.setApplicationId(applicationId);
        jobInfoDto.setJobId(jobId);
        jobInfoDto.setRunTime(runTime);
        jobInfoDto.setFlinkSQL(flinkSQL);
        jobInfoDto.setAllSql(allSql);
        jobInfoDto.setConfig(config);
        jobInfoDto.setJarUploadUser(jarUploadUser);
        jobInfoDto.setUploadTime(uploadTime);
        jobInfoDto.setRunLogId(runLogId);
        jobInfoDto.setQueenName(queenName);
        //节点信息
        if (null != nodeList) {
            JSONArray jsonArray = JSONArray.parseArray(nodeList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<FlinkTaskNodeVO> jobNodeInfos1 = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject objJobNode = JSONObject.parseObject(o.toString());
                        if (null != objJobNode) {
                            FlinkTaskNodeVO jobNode = analyFlinkTaskNode(objJobNode);
                            jobNodeInfos1.add(jobNode);
                        }
                    }
                }
                jobInfoDto.setNodeList(jobNodeInfos1);
            }
        }
        return jobInfoDto;
    }

    private JobNodeInfo analyJobNode(JSONObject objJobNode) {
        JobNodeInfo jobNodeInfo = new JobNodeInfo();
        Integer id = objJobNode.getInteger("id");
        String name = objJobNode.getString("name");
        Integer typeId = objJobNode.getInteger("typeId");
        Date createTime = objJobNode.getDate("createTime");
        Integer createPer = objJobNode.getInteger("createPer");
        String createPerName = objJobNode.getString("createPerName");
        Date modTime = objJobNode.getDate("modTime");
        Integer modPer = objJobNode.getInteger("modPer");
        Integer lastRunState = objJobNode.getInteger("lastRunState");
        Date lastRunTime = objJobNode.getDate("lastRunTime");
        Long lastRunCost = objJobNode.getLong("lastRunCost");
        Integer lastRunNum = objJobNode.getInteger("lastRunNum");
        Integer jobId = objJobNode.getInteger("jobId");
        String nodeKey = objJobNode.getString("nodeKey");
        String pNodeKey = objJobNode.getString("pNodeKey");
        Double posX = objJobNode.getDouble("posX");
        Double posY = objJobNode.getDouble("posY");
        Integer isNullRun = objJobNode.getInteger("isNullRun");
        Object jobNodeConfig = objJobNode.get("jobNodeConfig");
        String hostUrl = objJobNode.getString("hostUrl");
        String password = objJobNode.getString("password");
        String username = objJobNode.getString("username");
        Integer port = objJobNode.getInteger("port");


        Object jobNodeLayConfigDtoList = objJobNode.get("jobNodeLayConfigDtoList");

        jobNodeInfo.setId(id);
        jobNodeInfo.setName(name);
        jobNodeInfo.setTypeId(typeId);
        jobNodeInfo.setCreateTime(createTime);
        jobNodeInfo.setCreatePer(createPer);
        jobNodeInfo.setCreatePerName(createPerName);
        jobNodeInfo.setModTime(modTime);
        jobNodeInfo.setModPer(modPer);
        jobNodeInfo.setLastRunState(lastRunState);
        jobNodeInfo.setLastRunTime(lastRunTime);
        jobNodeInfo.setLastRunCost(lastRunCost);
        jobNodeInfo.setLastRunNum(lastRunNum);
        jobNodeInfo.setJobId(jobId);
        jobNodeInfo.setNodeKey(nodeKey);
        jobNodeInfo.setPNodeKey(pNodeKey);
        jobNodeInfo.setPosX(posX);
        jobNodeInfo.setPosY(posY);
        jobNodeInfo.setIsNullRun(isNullRun);
        //shell的服务器地址
        jobNodeInfo.setHostUrl(hostUrl);
        jobNodeInfo.setPassword(password);
        jobNodeInfo.setUsername(username);
        jobNodeInfo.setPort(port);


        if (null != jobNodeConfig) {
            jobNodeInfo.setJobNodeConfig(changeJobNodeConfig(JSONObject.parseObject(jobNodeConfig.toString())));
        }
        if (null != jobNodeLayConfigDtoList) {
            JSONArray jsonArray = JSONArray.parseArray(jobNodeLayConfigDtoList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<JobNodeLayConfigDto> jobNodeLayConfigDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        jobNodeLayConfigDtos.add(changeJobNodeLayConfigDto(JSONObject.parseObject(o.toString())));
                    }
                }
                jobNodeInfo.setJobNodeLayConfigDtoList(jobNodeLayConfigDtos);
            }
        }
        return jobNodeInfo;
    }

    private FlinkTaskNodeVO analyFlinkTaskNode(JSONObject objJobNode) {
        FlinkTaskNodeVO jobNodeInfo = new FlinkTaskNodeVO();
        Integer id = objJobNode.getInteger("id");
        Integer taskId = objJobNode.getInteger("taskId");
        Integer sourceId = objJobNode.getInteger("sourceId");
        String nodeName = objJobNode.getString("nodeName");
        Integer nodeType = objJobNode.getInteger("nodeType");
        String nodeTypeStr = objJobNode.getString("nodeTypeStr");
        String tableName = objJobNode.getString("tableName");
        String tableAlias = objJobNode.getString("tableAlias");
        String targetTableName = objJobNode.getString("targetTableName");
        String expression = objJobNode.getString("expression");
        String partitionBy = objJobNode.getString("partitionBy");
        String orderBy = objJobNode.getString("orderBy");
        String groupBy = objJobNode.getString("groupBy");
        Integer windowsFlag = objJobNode.getInteger("windowsFlag");
        String windowsFieldName = objJobNode.getString("windowsFieldName");
        String interval = objJobNode.getString("interval");
        String unit = objJobNode.getString("unit");
        Long createPer = objJobNode.getLong("createPer");
        String createPerName = objJobNode.getString("createPerName");
        Date createTime = objJobNode.getDate("createTime");
        JSONObject config = objJobNode.getJSONObject("config");
        String sql = objJobNode.getString("sql");

        Object fieldList = objJobNode.get("fieldList");

        jobNodeInfo.setId(id);
        jobNodeInfo.setTaskId(taskId);
        jobNodeInfo.setSourceId(sourceId);
        jobNodeInfo.setCreateTime(createTime);
        jobNodeInfo.setCreatePer(createPer);
        jobNodeInfo.setCreatePerName(createPerName);
        jobNodeInfo.setNodeName(nodeName);
        jobNodeInfo.setNodeType(nodeType);
        jobNodeInfo.setNodeTypeStr(nodeTypeStr);
        jobNodeInfo.setTableName(tableName);
        jobNodeInfo.setTableAlias(tableAlias);
        jobNodeInfo.setTargetTableName(targetTableName);
        jobNodeInfo.setExpression(expression);
        jobNodeInfo.setPartitionBy(partitionBy);
        jobNodeInfo.setOrderBy(orderBy);
        jobNodeInfo.setGroupBy(groupBy);
        jobNodeInfo.setWindowsFlag(windowsFlag);
        jobNodeInfo.setWindowsFieldName(windowsFieldName);
        //shell的服务器地址
        jobNodeInfo.setInterval(interval);
        jobNodeInfo.setUnit(unit);
        jobNodeInfo.setConfig(config);
        jobNodeInfo.setSql(sql);


        if (null != fieldList) {
            JSONArray jsonArray = JSONArray.parseArray(fieldList.toString());
            if (CollectionUtil.isNotEmpty(jsonArray)) {
                List<FlinkNodeField> jobNodeLayConfigDtos = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        jobNodeLayConfigDtos.add(changeFlinkNodeField(JSONObject.parseObject(o.toString())));
                    }
                }
                jobNodeInfo.setFieldList(jobNodeLayConfigDtos);
            }
        }
        return jobNodeInfo;
    }

    private JobNodeLayConfigDto changeJobNodeLayConfigDto(JSONObject parseObject) {
        JobNodeLayConfigDto jobNodeLayConfigDto = new JobNodeLayConfigDto();
        Integer id = parseObject.getInteger("id");
        Integer jobId = parseObject.getInteger("jobId");
        Integer configType = parseObject.getInteger("configType");
        Integer upNodeId = parseObject.getInteger("upNodeId");
        Integer currentNodeId = parseObject.getInteger("currentNodeId");
        String desc = parseObject.getString("desc");
        Date createTime = parseObject.getDate("createTime");
        Integer createPer = parseObject.getInteger("createPer");
        Integer outputTableId = parseObject.getInteger("outputTableId");
        String conditionNamme = parseObject.getString("conditionNamme");
        String operationNamme = parseObject.getString("operationNamme");
        String conditionValue = parseObject.getString("conditionValue");
        Integer dutyUser = parseObject.getInteger("dutyUser");
        String dutyUserName = parseObject.getString("dutyUserName");
        String tableName = parseObject.getString("tableName");
        String dbName = parseObject.getString("dbName");
        String upNodeName = parseObject.getString("upNodeName");
        String statesNamme = parseObject.getString("statesNamme");
        String statesValue = parseObject.getString("statesValue");

        jobNodeLayConfigDto.setId(id);
        jobNodeLayConfigDto.setJobId(jobId);
        jobNodeLayConfigDto.setConfigType(configType);
        jobNodeLayConfigDto.setUpNodeId(upNodeId);
        jobNodeLayConfigDto.setCurrentNodeId(currentNodeId);
        jobNodeLayConfigDto.setDesc(desc);
        jobNodeLayConfigDto.setCreateTime(createTime);
        jobNodeLayConfigDto.setCreatePer(createPer);
        jobNodeLayConfigDto.setOutputTableId(outputTableId);
        jobNodeLayConfigDto.setConditionNamme(conditionNamme);
        jobNodeLayConfigDto.setOperationNamme(operationNamme);
        jobNodeLayConfigDto.setConditionValue(conditionValue);
        jobNodeLayConfigDto.setDutyUser(dutyUser);
        jobNodeLayConfigDto.setDutyUserName(dutyUserName);
        jobNodeLayConfigDto.setDbName(dbName);
        jobNodeLayConfigDto.setTableName(tableName);
        jobNodeLayConfigDto.setUpNodeName(upNodeName);
        jobNodeLayConfigDto.setStatesNamme(statesNamme);
        jobNodeLayConfigDto.setStatesValue(statesValue);

        return jobNodeLayConfigDto;
    }

    private FlinkNodeField changeFlinkNodeField(JSONObject parseObject) {
        FlinkNodeField jobNodeLayConfigDto = new FlinkNodeField();
        Integer id = parseObject.getInteger("id");
        Integer nodeId = parseObject.getInteger("nodeId");
        String fieldName = parseObject.getString("fieldName");
        String fieldType = parseObject.getString("fieldType");
        String fieldAlias = parseObject.getString("fieldAlias");
        String fieldDesc = parseObject.getString("fieldDesc");
        Integer fieldOrder = parseObject.getInteger("fieldOrder");
        String fieldExpression = parseObject.getString("fieldExpression");
        Date createTime = parseObject.getDate("createTime");
        Long createPer = parseObject.getLong("createPer");
        Integer deleteFlag = parseObject.getInteger("deleteFlag");

        jobNodeLayConfigDto.setId(id);
        jobNodeLayConfigDto.setNodeId(nodeId);
        jobNodeLayConfigDto.setFieldName(fieldName);
        jobNodeLayConfigDto.setFieldType(fieldType);
        jobNodeLayConfigDto.setFieldAlias(fieldAlias);
        jobNodeLayConfigDto.setFieldDesc(fieldDesc);
        jobNodeLayConfigDto.setCreateTime(createTime);
        jobNodeLayConfigDto.setCreatePer(createPer);
        jobNodeLayConfigDto.setFieldOrder(fieldOrder);
        jobNodeLayConfigDto.setFieldExpression(fieldExpression);
        jobNodeLayConfigDto.setDeleteFlag(deleteFlag);

        return jobNodeLayConfigDto;
    }

    private WorkFlowDepDto changeWorkFlowDepDto(JSONObject objWorkFlowDepDto) {
        WorkFlowDepDto workFlowDepDto = new WorkFlowDepDto();
        Long id = objWorkFlowDepDto.getLong("id");
        Integer procId = objWorkFlowDepDto.getInteger("procId");
        String param = objWorkFlowDepDto.getString("param");
        Long workMenuId = objWorkFlowDepDto.getLong("workMenuId");
        Integer lastRunState = objWorkFlowDepDto.getInteger("lastRunState");
        Object createTime = objWorkFlowDepDto.get("createTime");
        Integer jobLayStatus = objWorkFlowDepDto.getInteger("jobLayStatus");
        String lastOozieId = objWorkFlowDepDto.getString("lastOozieId");
        String lastCorOozieId = objWorkFlowDepDto.getString("lastCorOozieId");
        Integer num = objWorkFlowDepDto.getInteger("num");
        String descName = objWorkFlowDepDto.getString("descName");
        Integer createPer = objWorkFlowDepDto.getInteger("createPer");
        String createPerName = objWorkFlowDepDto.getString("createPerName");


        workFlowDepDto.setId(id);
        workFlowDepDto.setProcId(procId);
        workFlowDepDto.setParam(param);
        workFlowDepDto.setWorkMenuId(workMenuId);
        workFlowDepDto.setLastRunState(lastRunState);
        if (null != createTime) {
            workFlowDepDto.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        }
        workFlowDepDto.setJobLayStatus(jobLayStatus);
        workFlowDepDto.setLastOozieId(lastOozieId);
        workFlowDepDto.setLastCorOozieId(lastCorOozieId);
        workFlowDepDto.setNum(num);
        workFlowDepDto.setDescName(descName);
        workFlowDepDto.setCreatePer(createPer);
        workFlowDepDto.setCreatePerName(createPerName);

        return workFlowDepDto;
    }

    private JobNodeConfig changeJobNodeConfig(JSONObject objJobNodeConfig) {
        JobNodeConfig jobNodeConfig = new JobNodeConfig();

        Integer jobNodeId = objJobNodeConfig.getInteger("jobNodeId");
        Integer schedule_type = objJobNodeConfig.getInteger("schedule_type");
        Integer scheduleOrInterval = objJobNodeConfig.getInteger("scheduleOrInterval");
        String expression = objJobNodeConfig.getString("expression");
        String rangerUserName = objJobNodeConfig.getString("rangerUserName");
        String rangerUserPassword = objJobNodeConfig.getString("rangerUserPassword");
        Integer input_connect_type = objJobNodeConfig.getInteger("input_connect_type");
        Integer input_connect_id = objJobNodeConfig.getInteger("input_connect_id");
        String input_connect_name = objJobNodeConfig.getString("input_connect_name");
        String input_input_type = objJobNodeConfig.getString("input_input_type");
        String input_input_content = objJobNodeConfig.getString("input_input_content");
        String input_db_name = objJobNodeConfig.getString("input_db_name");
        String input_table_name = objJobNodeConfig.getString("input_table_name");
        String input_file_position = objJobNodeConfig.getString("input_file_position");
        String input_data_partition = objJobNodeConfig.getString("input_data_partition");
        Integer output_connect_type = objJobNodeConfig.getInteger("output_connect_type");
        Integer output_connect_id = objJobNodeConfig.getInteger("output_connect_id");
        String output_connect_name = objJobNodeConfig.getString("output_connect_name");
        String output_db_name = objJobNodeConfig.getString("output_db_name");
        String output_table_name = objJobNodeConfig.getString("output_table_name");
        String output_write_model = objJobNodeConfig.getString("output_write_model");
        String output_data_partition = objJobNodeConfig.getString("output_data_partition");
        String output_pre_statment = objJobNodeConfig.getString("output_pre_statment");
        String database_tablename = objJobNodeConfig.getString("database_tablename");
        String hight_file_num = objJobNodeConfig.getString("hight_file_num");
        String hightMaxConcurrent = objJobNodeConfig.getString("hightMaxConcurrent");
        String ftpFileLocation = objJobNodeConfig.getString("ftpFileLocation");
        Integer nonStandardFormat = objJobNodeConfig.getInteger("nonStandardFormat");
        Integer isOpenLoodAccess = objJobNodeConfig.getInteger("isOpenLoodAccess");
        Integer batchSize = objJobNodeConfig.getInteger("batchSize");
        String beginGDA = objJobNodeConfig.getString("beginGDA");
        String endGDA = objJobNodeConfig.getString("endGDA");
        String stopSign = objJobNodeConfig.getString("stopSign");
        String stopSignVal = objJobNodeConfig.getString("stopSignVal");
        String sql_statment = objJobNodeConfig.getString("sql_statment");
        String priorityConfig = objJobNodeConfig.getString("priorityConfig");
        String base_proc_main_class = objJobNodeConfig.getString("base_proc_main_class");
        String base_proc_main_in = objJobNodeConfig.getString("base_proc_main_in");
        String base_proc_main_out = objJobNodeConfig.getString("base_proc_main_out");
        String base_proc_main_args = objJobNodeConfig.getString("base_proc_main_args");
        String base_proc_main_file = objJobNodeConfig.getString("base_proc_main_file");
        String resource_dm = objJobNodeConfig.getString("resource_dm");
        String resource_dc = objJobNodeConfig.getString("resource_dc");
        String resource_em = objJobNodeConfig.getString("resource_em");
        String resource_ec = objJobNodeConfig.getString("resource_ec");
        Integer jobType = objJobNodeConfig.getInteger("jobType");

        Object sap_output_table_name = objJobNodeConfig.get("sap_output_table_name");
        Object sapConnectFieldInfo = objJobNodeConfig.get("sapConnectFieldInfo");
        Object jobOutPutTableIds = objJobNodeConfig.get("jobOutPutTableIds");
        Object jobOutPutTableNames = objJobNodeConfig.get("jobOutPutTableNames");
        Object sysParam = objJobNodeConfig.get("sysParam");
        Object nodeParam = objJobNodeConfig.get("nodeParam");
        Integer isRetry = objJobNodeConfig.getInteger("isRetry");
        Integer isDurTime = objJobNodeConfig.getInteger("isDurTime");
        Integer reTryMax = objJobNodeConfig.getInteger("reTryMax");
        Integer reTryInterval = objJobNodeConfig.getInteger("reTryInterval");
        String startTime = objJobNodeConfig.getString("startTime");
        String endTime = objJobNodeConfig.getString("endTime");
        Integer isOpenTime = objJobNodeConfig.getInteger("isOpenTime");
        Double sysDurTime = objJobNodeConfig.getDouble("sysDurTime");
        String sysStartTime = objJobNodeConfig.getString("sysStartTime");
        String sysEndTime = objJobNodeConfig.getString("sysEndTime");
        Integer isOpenOutHours = objJobNodeConfig.getInteger("isOpenOutHours");
        Integer outHours = objJobNodeConfig.getInteger("outHours");

        String output_fix_statment = objJobNodeConfig.getString("output_fix_statment");
        Integer startPageCount = objJobNodeConfig.getInteger("startPageCount");
        Integer pageNum = objJobNodeConfig.getInteger("pageNum");
        Integer pageSize = objJobNodeConfig.getInteger("pageSize");
        String endName = objJobNodeConfig.getString("endName");
        Integer enableIncresement = objJobNodeConfig.getInteger("enableIncresement");
        Integer output_storage_engine_type = objJobNodeConfig.getInteger("output_storage_engine_type");
        Integer query_engine = objJobNodeConfig.getInteger("query_engine");
        String esIndex = objJobNodeConfig.getString("esIndex");
        String esIndexType = objJobNodeConfig.getString("esIndexType");
        Long esPageSize = objJobNodeConfig.getLong("esPageSize");
        Long esPageTime = objJobNodeConfig.getLong("esPageTime");
        String esSqlCondition = objJobNodeConfig.getString("esSqlCondition");
        //另外一种形式的webservice
        Integer reqType = objJobNodeConfig.getInteger("reqType");
        String webserviceText = objJobNodeConfig.getString("webserviceText");
        Integer resType = objJobNodeConfig.getInteger("resType");
        String anaTableNameUrl = objJobNodeConfig.getString("anaTableNameUrl");
        Integer olderRequestType = objJobNodeConfig.getInteger("olderRequestType");

        Integer cronType = objJobNodeConfig.getInteger("cronType");
        String cronUrl = objJobNodeConfig.getString("cronUrl");
        String ftpFileType = objJobNodeConfig.getString("ftpFileType");
        Integer ftpFileMatchType = objJobNodeConfig.getInteger("ftpFileMatchType");
        String ftpFileName = objJobNodeConfig.getString("ftpFileName");


        jobNodeConfig.setJobNodeId(jobNodeId);
        jobNodeConfig.setSchedule_type(schedule_type);
        jobNodeConfig.setScheduleOrInterval(scheduleOrInterval);
        jobNodeConfig.setExpression(expression);
        jobNodeConfig.setRangerUserName(rangerUserName);
        jobNodeConfig.setRangerUserPassword(rangerUserPassword);
        jobNodeConfig.setInput_connect_type(input_connect_type);
        jobNodeConfig.setInput_connect_id(input_connect_id);
        jobNodeConfig.setInput_connect_name(input_connect_name);
        jobNodeConfig.setInput_input_type(input_input_type);
        jobNodeConfig.setInput_input_content(input_input_content);
        jobNodeConfig.setInput_db_name(input_db_name);
        jobNodeConfig.setInput_table_name(input_table_name);
        jobNodeConfig.setInput_file_position(input_file_position);
        jobNodeConfig.setInput_data_partition(input_data_partition);
        jobNodeConfig.setOutput_connect_type(output_connect_type);
        jobNodeConfig.setOutput_connect_id(output_connect_id);
        jobNodeConfig.setOutput_connect_name(output_connect_name);
        jobNodeConfig.setOutput_db_name(output_db_name);
        jobNodeConfig.setOutput_table_name(output_table_name);
        jobNodeConfig.setOutput_write_model(output_write_model);
        jobNodeConfig.setOutput_data_partition(output_data_partition);
        jobNodeConfig.setOutput_pre_statment(output_pre_statment);
        jobNodeConfig.setDatabase_tablename(database_tablename);
        jobNodeConfig.setHight_file_num(hight_file_num);
        jobNodeConfig.setHightMaxConcurrent(hightMaxConcurrent);
        jobNodeConfig.setFtpFileLocation(ftpFileLocation);
        jobNodeConfig.setNonStandardFormat(nonStandardFormat);
        jobNodeConfig.setIsOpenLoodAccess(isOpenLoodAccess);
        jobNodeConfig.setBatchSize(batchSize);
        jobNodeConfig.setBeginGDA(beginGDA);
        jobNodeConfig.setEndGDA(endGDA);
        jobNodeConfig.setStopSign(stopSign);
        jobNodeConfig.setStopSignVal(stopSignVal);
        jobNodeConfig.setSql_statment(sql_statment);
        jobNodeConfig.setPriorityConfig(priorityConfig);
        jobNodeConfig.setBase_proc_main_class(base_proc_main_class);
        jobNodeConfig.setBase_proc_main_in(base_proc_main_in);
        jobNodeConfig.setBase_proc_main_out(base_proc_main_out);
        jobNodeConfig.setBase_proc_main_args(base_proc_main_args);
        jobNodeConfig.setBase_proc_main_file(base_proc_main_file);
        jobNodeConfig.setResource_dm(resource_dm);
        jobNodeConfig.setResource_dc(resource_dc);
        jobNodeConfig.setResource_em(resource_em);
        jobNodeConfig.setResource_ec(resource_ec);
        jobNodeConfig.setJobType(jobType);
        jobNodeConfig.setIsDurTime(isDurTime);
        jobNodeConfig.setStartTime(startTime);
        jobNodeConfig.setEndTime(endTime);
        jobNodeConfig.setReTryMax(reTryMax);
        jobNodeConfig.setIsRetry(isRetry);
        jobNodeConfig.setReTryInterval(reTryInterval);
        jobNodeConfig.setIsOpenTime(isOpenTime);
        jobNodeConfig.setSysDurTime(sysDurTime);
        jobNodeConfig.setSysStartTime(sysStartTime);
        jobNodeConfig.setSysEndTime(sysEndTime);
        jobNodeConfig.setIsOpenOutHours(isOpenOutHours);
        jobNodeConfig.setOutHours(outHours);

        jobNodeConfig.setOutput_fix_statment(output_fix_statment);
        jobNodeConfig.setStartPageCount(startPageCount);
        jobNodeConfig.setPageNum(pageNum);
        jobNodeConfig.setPageSize(pageSize);
        jobNodeConfig.setEndName(endName);
        jobNodeConfig.setEnableIncresement(enableIncresement);
        jobNodeConfig.setOutput_storage_engine_type(output_storage_engine_type);
        jobNodeConfig.setQuery_engine(query_engine);

        jobNodeConfig.setEsIndex(esIndex);
        jobNodeConfig.setEsIndexType(esIndexType);
        jobNodeConfig.setEsPageSize(esPageSize);
        jobNodeConfig.setEsPageTime(esPageTime);
        jobNodeConfig.setEsSqlCondition(esSqlCondition);

        jobNodeConfig.setReqType(reqType);
        jobNodeConfig.setOlderRequestType(olderRequestType);
        jobNodeConfig.setWebserviceText(webserviceText);
        jobNodeConfig.setResType(resType);
        jobNodeConfig.setAnaTableNameUrl(anaTableNameUrl);

        jobNodeConfig.setCronUrl(cronUrl);
        jobNodeConfig.setCronType(cronType);
        jobNodeConfig.setFtpFileType(ftpFileType);
        jobNodeConfig.setFtpFileMatchType(ftpFileMatchType);
        jobNodeConfig.setFtpFileName(ftpFileName);

        //sap的配置
        if (null != sap_output_table_name) {
            JSONArray jsonArray = JSONArray.parseArray(sap_output_table_name.toString());
            if (null != jsonArray) {
                List<String> restList = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        restList.add(o.toString());
                    }
                }
                jobNodeConfig.setSap_output_table_name(restList);
            }
        }
        if (null != sapConnectFieldInfo) {
            String sapConnectFieldInfos = sapConnectFieldInfo.toString();
            if (StringUtils.isNotEmpty(sapConnectFieldInfos)) {
                String[] sapParams = {"fieldName", "fieldKind", "fieldValue", "fieldAlias", "fieldInputType", "fieldDataType"};
                List<String> list = new ArrayList<>();
                for (String sapParam : sapParams
                ) {
                    list.add(sapParam);
                }
                JSONObject jsonObject = JSONObject.parseObject(sapConnectFieldInfos);
                if (null != jsonObject) {
                    SapConnectField sapConnectField = new SapConnectField();
                    sapConnectField.setId(jsonObject.getInteger("id"));
                    sapConnectField.setConnectId(jsonObject.getInteger("connectId"));
                    sapConnectField.setRfcFunc(jsonObject.getString("rfcFunc"));
                    sapConnectField.setInputTableName(jsonObject.getString("inputTableName"));
                    sapConnectField.setOutputTableName(jsonObject.getString("outputTableName"));
                    sapConnectField.setIsGroup(jsonObject.getInteger("isGroup"));
                    sapConnectField.setGroupName(jsonObject.getString("groupName"));
                    sapConnectField.setR3Name(jsonObject.getString("r3Name"));
                    sapConnectField.setSysnr(jsonObject.getString("sysnr"));
                    sapConnectField.setLang(jsonObject.getString("lang"));


                    if (jsonObject != null && jsonObject.containsKey("ainputParams")) {
                        String ainputParams = jsonObject.get("ainputParams").toString();
                        JSONArray jsonArray = JSONArray.parseArray(ainputParams);
                        List<JSONObject> jsonArray1 = new ArrayList<>();
                        for (Object obj : jsonArray
                        ) {
                            String string = JSONObject.toJSONString(obj);
                            JSONObject jsonObject1 = JSONObject.parseObject(string);
                            List<String> keys = new ArrayList<>(jsonObject1.keySet());
                            list.removeAll(keys);
                            for (String s : list
                            ) {
                                jsonObject1.put(s, "");
                            }
                            jsonArray1.add(jsonObject1);
                        }
                        sapConnectField.setAinputParams(jsonArray1);
                    }
                    if (null != jsonObject) {
                        Object aoutputParams = jsonObject.get("aoutputParams");
                        if (null != aoutputParams) {
                            JSONArray jsonArray = JSONArray.parseArray(aoutputParams.toString());
                            List<JSONObject> jsonArray1 = new ArrayList<>();
                            for (Object obj : jsonArray
                            ) {
                                String string = JSONObject.toJSONString(obj);
                                JSONObject jsonObject1 = JSONObject.parseObject(string);
                                List<String> keys = new ArrayList<>(jsonObject1.keySet());
                                list.removeAll(keys);
                                for (String s : list
                                ) {
                                    jsonObject1.put(s, "");
                                }
                                jsonArray1.add(jsonObject1);
                            }
                            sapConnectField.setAoutputParams(jsonArray1);
                        }
                    }

                    jobNodeConfig.setSapConnectFieldInfo(sapConnectField);
                }
            }

        }
        if (null != jobOutPutTableIds) {
            JSONArray jsonArray = JSONArray.parseArray(jobOutPutTableIds.toString());
            if (null != jsonArray) {
                List<String> restList = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        restList.add(o.toString());
                    }
                }
                jobNodeConfig.setJobOutPutTableIds(restList);
            }
        }
        if (null != jobOutPutTableNames) {
            JSONArray jsonArray = JSONArray.parseArray(jobOutPutTableNames.toString());
            if (null != jsonArray) {
                List<String> restList = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        restList.add(o.toString());
                    }
                }
                jobNodeConfig.setJobOutPutTableNames(restList);
            }
        }
        if (null != sysParam) {
            JSONArray jsonArray = JSONArray.parseArray(sysParam.toString());
            if (null != jsonArray) {
                List<Map<String, Object>> sysParamList = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject obj = JSONObject.parseObject(o.toString());
                        if (null != obj) {
                            Map<String, Object> innerMap = obj.getInnerMap();
                            sysParamList.add(innerMap);
                        }
                    }
                }
                jobNodeConfig.setSysParam(sysParamList);
            }
        }
        if(null != nodeParam){
            JSONArray jsonArray = JSONArray.parseArray(nodeParam.toString());
            if (null != jsonArray) {
                List<JSONObject> nodeParams = new ArrayList<>();
                for (Object o : jsonArray) {
                    if (null != o) {
                        JSONObject obj = JSONObject.parseObject(o.toString());
                        if (null != obj) {
                            nodeParams.add(obj);
                        }
                    }
                }
                jobNodeConfig.setNodeParam(nodeParams);
            }
        }
        return jobNodeConfig;
    }

    private WorkMenuJobRel analyWorkMenuJob(JSONObject jsonObject1) {
        WorkMenuJobRel workMenuJobRel = new WorkMenuJobRel();
        Long id = jsonObject1.getLong("id");
        Integer procId = jsonObject1.getInteger("procId");
        Integer workType = jsonObject1.getInteger("workType");
        Long workMenuId = jsonObject1.getLong("workMenuId");
        Long workFlowId = jsonObject1.getLong("workFlowId");
        Object createTime = jsonObject1.get("createTime");

        workMenuJobRel.setId(id);
        workMenuJobRel.setProcId(procId);
        workMenuJobRel.setWorkType(workType);
        workMenuJobRel.setWorkMenuId(workMenuId);
        workMenuJobRel.setWorkFlowId(workFlowId);
        if (null != createTime) {
            workMenuJobRel.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        }
        return workMenuJobRel;
    }

    private JobLink analyJobLink(JSONObject objJobLink) {
        JobLink jobLink = new JobLink();
        Integer id1 = objJobLink.getInteger("id");
        String name1 = objJobLink.getString("name");
        Long menuId = objJobLink.getLong("menuId");
        Integer linkeType = objJobLink.getInteger("linkeType");
        String desc = objJobLink.getString("desc");
        Integer createPer = objJobLink.getInteger("createPer");
        String createPerName = objJobLink.getString("createPerName");
        Integer dstNodeId = objJobLink.getInteger("dstNodeId");
        Integer srcNodeId = objJobLink.getInteger("srcNodeId");
        Date createTime = objJobLink.getDate("createTime");

        jobLink.setId(id1);
        jobLink.setName(name1);
        jobLink.setMenuId(menuId);
        jobLink.setLinkeType(linkeType);
        jobLink.setDesc(desc);
        jobLink.setCreateTime(createTime);
        jobLink.setCreatePer(createPer);
        jobLink.setCreatePerName(createPerName);
        jobLink.setDstNodeId(dstNodeId);
        jobLink.setSrcNodeId(srcNodeId);
        return jobLink;
    }


    private List<JobNodeLayConfig> analAllJobNodeLayCongigs(Object allJobNodeLayCongigs) {
        List<JobNodeLayConfig> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobNodeLayCongigs.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobNodeLayConfig jobNodeLayConfig = new JobNodeLayConfig();
                    jobNodeLayConfig.setId(jsonObject.getInteger("id"));
                    jobNodeLayConfig.setJobId(jsonObject.getInteger("jobId"));
                    jobNodeLayConfig.setConfigType(jsonObject.getInteger("configType"));
                    jobNodeLayConfig.setUpNodeId(jsonObject.getInteger("upNodeId"));
                    jobNodeLayConfig.setCurrentNodeId(jsonObject.getInteger("currentNodeId"));
                    jobNodeLayConfig.setDesc(jsonObject.getString("desc"));
                    jobNodeLayConfig.setCreateTime(jsonObject.getDate("createTime"));
                    jobNodeLayConfig.setCreatePer(jsonObject.getInteger("createPer"));
                    jobNodeLayConfig.setOutputTableId(jsonObject.getInteger("outputTableId"));
                    jobNodeLayConfig.setConditionNamme(jsonObject.getString("conditionNamme"));
                    jobNodeLayConfig.setOperationNamme(jsonObject.getString("operationNamme"));
                    jobNodeLayConfig.setConditionValue(jsonObject.getString("conditionValue"));
                    jobNodeLayConfig.setStatesNamme(jsonObject.getString("statesNamme"));
                    jobNodeLayConfig.setStatesValue(jsonObject.getString("statesValue"));
                    jobNodeLayConfig.setDutyUserName(jsonObject.getString("dutyUserName"));
                    jobNodeLayConfig.setDutyUser(jsonObject.getInteger("dutyUser"));
                    allList.add(jobNodeLayConfig);
                }
            }
        }
        return allList;
    }

    private List<JobNodeInfo> analAllJobNodeInfos(Object allJobNodeInfos) {
        List<JobNodeInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobNodeInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobNodeInfo jobNodeInfo = new JobNodeInfo();
                    jobNodeInfo.setId(jsonObject.getInteger("id"));
                    jobNodeInfo.setName(jsonObject.getString("name"));
                    jobNodeInfo.setTypeId(jsonObject.getInteger("typeId"));
                    jobNodeInfo.setEnable(jsonObject.getBoolean("enable"));
                    jobNodeInfo.setCreateTime(jsonObject.getDate("createTime"));
                    jobNodeInfo.setCreatePer(jsonObject.getInteger("createPer"));
                    jobNodeInfo.setModTime(jsonObject.getDate("modTime"));
                    jobNodeInfo.setModPer(jsonObject.getInteger("modPer"));
                    jobNodeInfo.setLastRunState(jsonObject.getInteger("lastRunState"));
                    jobNodeInfo.setLastRunTime(jsonObject.getDate("lastRunTime"));
                    jobNodeInfo.setLastRunCost(jsonObject.getLong("lastRunCost"));
                    jobNodeInfo.setLastRunNum(jsonObject.getInteger("lastRunNum"));
                    jobNodeInfo.setJobId(jsonObject.getInteger("jobId"));
                    jobNodeInfo.setNodeKey(jsonObject.getString("nodeKey"));
                    jobNodeInfo.setPNodeKey(jsonObject.getString("pNodeKey"));
                    jobNodeInfo.setPosX(jsonObject.getDouble("posX"));
                    jobNodeInfo.setPosY(jsonObject.getDouble("posY"));
                    jobNodeInfo.setHostUrl(jsonObject.getString("hostUrl"));
                    jobNodeInfo.setPort(jsonObject.getInteger("port"));
                    jobNodeInfo.setUsername(jsonObject.getString("username"));
                    jobNodeInfo.setPassword(jsonObject.getString("password"));
                    allList.add(jobNodeInfo);
                }
            }
        }
        return allList;
    }

    private List<JobInfo> analAllJobInfos(Object allJobInfos) {
        List<JobInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobInfo jobInfo = new JobInfo();
                    jobInfo.setId(jsonObject.getInteger("id"));
                    jobInfo.setName(jsonObject.getString("name"));
                    jobInfo.setDesc(jsonObject.getString("desc"));
                    jobInfo.setEnable(jsonObject.getBoolean("enable"));
                    jobInfo.setCreateTime(jsonObject.getDate("createTime"));
                    jobInfo.setCreatePer(jsonObject.getInteger("createPer"));
                    jobInfo.setModTime(jsonObject.getDate("modTime"));
                    jobInfo.setModPer(jsonObject.getInteger("modPer"));
                    jobInfo.setLastRunState(jsonObject.getInteger("lastRunState"));
                    jobInfo.setLastRunTime(jsonObject.getDate("lastRunTime"));
                    jobInfo.setLastRunCost(jsonObject.getLong("lastRunCost"));
                    jobInfo.setLastRunNum(jsonObject.getInteger("lastRunNum"));
                    jobInfo.setSuccessCount(jsonObject.getLong("successCount"));
                    jobInfo.setFailCount(jsonObject.getLong("failCount"));
                    jobInfo.setFailMailAddress(jsonObject.getString("failMailAddress"));
                    jobInfo.setProcId(jsonObject.getInteger("procId"));
                    jobInfo.setParam(jsonObject.getString("param"));
                    jobInfo.setLastOozieJobId(jsonObject.getString("lastOozieJobId"));
                    jobInfo.setLastCorOozieJobId(jsonObject.getString("lastCorOozieJobId"));
                    jobInfo.setPosX(jsonObject.getDouble("posX"));
                    jobInfo.setPosY(jsonObject.getDouble("posY"));
                    allList.add(jobInfo);
                }
            }
        }
        return allList;
    }

    private List<JobNodeConf> analAllJobMenusConfs(Object allJobMenusConfs) {
        List<JobNodeConf> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobMenusConfs.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobNodeConf jobNodeConf = new JobNodeConf();
                    jobNodeConf.setId(jsonObject.getInteger("id"));
                    jobNodeConf.setKey(jsonObject.getString("key"));
                    jobNodeConf.setValue(jsonObject.getString("value"));
                    jobNodeConf.setJobNodeId(jsonObject.getInteger("jobNodeId"));
                    jobNodeConf.setJobType(jsonObject.getInteger("jobType"));
                    allList.add(jobNodeConf);
                }
            }
        }
        return allList;
    }

    private List<JobLink> analAllJobLinks(Object allJobLinks) {
        List<JobLink> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobLinks.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobLink jobLink = new JobLink();
                    jobLink.setId(jsonObject.getInteger("id"));
                    jobLink.setName(jsonObject.getString("name"));
                    jobLink.setMenuId(jsonObject.getLong("menuId"));
                    jobLink.setLinkeType(jsonObject.getInteger("linkeType"));
                    jobLink.setDesc(jsonObject.getString("desc"));
                    jobLink.setCreateTime(jsonObject.getDate("createTime"));
                    jobLink.setCreatePer(jsonObject.getInteger("createPer"));
                    jobLink.setDstNodeId(jsonObject.getInteger("dstNodeId"));
                    jobLink.setSrcNodeId(jsonObject.getInteger("srcNodeId"));
                    allList.add(jobLink);
                }
            }
        }
        return allList;
    }

    private List<WorkFlowDep> analAllWorkFlowDeps(Object allWorkFlowDeps) {
        List<WorkFlowDep> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkFlowDeps.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    WorkFlowDep workFlowDep = new WorkFlowDep();
                    workFlowDep.setId(jsonObject.getLong("id"));
                    workFlowDep.setProcId(jsonObject.getInteger("procId"));
                    workFlowDep.setParam(jsonObject.getString("param"));
                    workFlowDep.setWorkMenuId(jsonObject.getLong("workMenuId"));
                    workFlowDep.setLastRunState(jsonObject.getInteger("lastRunState"));
                    if (null != jsonObject.get("createTime")) {
                        workFlowDep.setCreateTime(LocalDateTime.parse(jsonObject.get("createTime").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    workFlowDep.setJobLayStatus(jsonObject.getInteger("jobLayStatus"));
                    workFlowDep.setLastOozieId(jsonObject.getString("lastOozieId"));
                    workFlowDep.setLastCorOozieId(jsonObject.getString("lastCorOozieId"));
                    workFlowDep.setNum(jsonObject.getInteger("num"));
                    workFlowDep.setDescName(jsonObject.getString("descName"));
                    workFlowDep.setCreatePer(jsonObject.getInteger("createPer"));
                    allList.add(workFlowDep);
                }
            }
        }
        return allList;
    }

    private List<WorkMenuJobRel> analAllWorkMenuJobRels(Object workMenuJobRels) {
        List<WorkMenuJobRel> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(workMenuJobRels.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    WorkMenuJobRel workMenuJobRel = new WorkMenuJobRel();
                    workMenuJobRel.setId(jsonObject.getLong("id"));
                    workMenuJobRel.setProcId(jsonObject.getInteger("procId"));
                    workMenuJobRel.setWorkType(jsonObject.getInteger("workType"));
                    workMenuJobRel.setWorkMenuId(jsonObject.getLong("workMenuId"));
                    workMenuJobRel.setWorkFlowId(jsonObject.getLong("workFlowId"));
                    if (null != jsonObject.get("createTime")) {
                        workMenuJobRel.setCreateTime(LocalDateTime.parse(jsonObject.get("createTime").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    allList.add(workMenuJobRel);
                }
            }
        }
        return allList;
    }

    private List<WorkMenu> analAllWorkMenus(Object allWorkMenus) {
        List<WorkMenu> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    WorkMenu workMenu = new WorkMenu();
                    workMenu.setId(jsonObject.getLong("id"));
                    workMenu.setProcId(jsonObject.getInteger("procId"));
                    workMenu.setParentId(jsonObject.getLong("parentId"));
                    workMenu.setWorkType(jsonObject.getInteger("workType"));
                    workMenu.setRootId(jsonObject.getLong("rootId"));
                    workMenu.setName(jsonObject.getString("name"));
                    workMenu.setDescName(jsonObject.getString("descName"));
                    workMenu.setIcon(jsonObject.getString("icon"));
                    workMenu.setOrderNum(jsonObject.getInteger("orderNum"));
                    if (null != jsonObject.get("createTime")) {
                        workMenu.setCreateTime(LocalDateTime.parse(jsonObject.get("createTime").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    workMenu.setCreatePer(jsonObject.getInteger("createPer"));
                    allList.add(workMenu);
                }
            }
        }
        return allList;
    }

    private List<RealTimeTaskMenu> analAllRealWorkMenus(Object allWorkMenus) {
        List<RealTimeTaskMenu> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    RealTimeTaskMenu workMenuAndLayDto = new RealTimeTaskMenu();
                    Integer id = jsonObject.getInteger("id");
                    Integer procId = jsonObject.getInteger("procId");
                    Integer parentId = jsonObject.getInteger("parentId");
                    Integer menuType = jsonObject.getInteger("menuType");
                    String name = jsonObject.getString("name");
                    Integer level = jsonObject.getInteger("level");
                    String description = jsonObject.getString("description");
                    Integer state = jsonObject.getInteger("state");
                    Object createTime = jsonObject.get("createTime");
                    Integer createPer = jsonObject.getInteger("createPer");

                    workMenuAndLayDto.setId(id);
                    workMenuAndLayDto.setProcId(procId);
                    workMenuAndLayDto.setParentId(parentId);
                    workMenuAndLayDto.setMenuType(menuType);
                    workMenuAndLayDto.setName(name);
                    workMenuAndLayDto.setLevel(level);
                    workMenuAndLayDto.setDescription(description);
                    workMenuAndLayDto.setState(state);
                    workMenuAndLayDto.setCreatePer(createPer);
                    if (null != createTime) {
                        workMenuAndLayDto.setCreateTime(LocalDateTime.parse(createTime.toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    allList.add(workMenuAndLayDto);
                }
            }
        }
        return allList;
    }

    private List<BdpRealTaskAlarmObject> analAllTaskObject(Object allWorkMenus) {
        List<BdpRealTaskAlarmObject> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objs = JSONObject.parseObject(o.toString());
                    BdpRealTaskAlarmObject alarmObject = new BdpRealTaskAlarmObject();
                    alarmObject.setId(objs.getInteger("id"));
                    alarmObject.setAlarmId(objs.getInteger("alarmId"));
                    alarmObject.setObjectType(objs.getInteger("objectType"));
                    alarmObject.setObjectId(objs.getInteger("objectId"));
                    alarmObject.setObjectName(objs.getString("objectName"));
                    allList.add(alarmObject);
                }
            }
        }
        return allList;
    }

    private List<FlinkTaskNode> analAllFlinkTaskNode(Object allWorkMenus) {
        List<FlinkTaskNode> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objJobNode = JSONObject.parseObject(o.toString());
                    FlinkTaskNode jobNodeInfo = new FlinkTaskNode();
                    Integer id = objJobNode.getInteger("id");
                    Integer taskId = objJobNode.getInteger("taskId");
                    Integer sourceId = objJobNode.getInteger("sourceId");
                    String nodeName = objJobNode.getString("nodeName");
                    Integer nodeType = objJobNode.getInteger("nodeType");
                    String nodeTypeStr = objJobNode.getString("nodeTypeStr");
                    String tableName = objJobNode.getString("tableName");
                    String tableAlias = objJobNode.getString("tableAlias");
                    String targetTableName = objJobNode.getString("targetTableName");
                    String expression = objJobNode.getString("expression");
                    String partitionBy = objJobNode.getString("partitionBy");
                    String orderBy = objJobNode.getString("orderBy");
                    String groupBy = objJobNode.getString("groupBy");
                    Integer windowsFlag = objJobNode.getInteger("windowsFlag");
                    String windowsFieldName = objJobNode.getString("windowsFieldName");
                    String interval = objJobNode.getString("interval");
                    String unit = objJobNode.getString("unit");
                    Long createPer = objJobNode.getLong("createPer");
                    String createPerName = objJobNode.getString("createPerName");
                    Date createTime = objJobNode.getDate("createTime");
                    JSONObject config = objJobNode.getJSONObject("config");
                    String sql = objJobNode.getString("sql");

                    Object fieldList = objJobNode.get("fieldList");

                    jobNodeInfo.setId(id);
                    jobNodeInfo.setTaskId(taskId);
                    jobNodeInfo.setSourceId(sourceId);
                    jobNodeInfo.setCreateTime(createTime);
                    jobNodeInfo.setCreatePer(createPer);
                    jobNodeInfo.setNodeName(nodeName);
                    jobNodeInfo.setNodeType(nodeType);
                    jobNodeInfo.setTableName(tableName);
                    jobNodeInfo.setTableAlias(tableAlias);
                    jobNodeInfo.setTargetTableName(targetTableName);
                    jobNodeInfo.setExpression(expression);
                    jobNodeInfo.setPartitionBy(partitionBy);
                    jobNodeInfo.setOrderBy(orderBy);
                    jobNodeInfo.setGroupBy(groupBy);
                    jobNodeInfo.setWindowsFlag(windowsFlag);
                    jobNodeInfo.setWindowsFieldName(windowsFieldName);
                    //shell的服务器地址
                    allList.add(jobNodeInfo);
                }
            }
        }
        return allList;
    }

    private List<FlinkNodeUnion> analAllFlinkNodeUnion(Object allWorkMenus) {
        List<FlinkNodeUnion> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objs = JSONObject.parseObject(o.toString());
                    FlinkNodeUnion alarmObject = new FlinkNodeUnion();
                    alarmObject.setTaskId(objs.getInteger("taskId"));
                    alarmObject.setNodeFrom(objs.getInteger("nodeFrom"));
                    alarmObject.setNodeTo(objs.getInteger("nodeTo"));
                    alarmObject.setWebFrom(objs.getString("webFrom"));
                    alarmObject.setWebTo(objs.getString("webTo"));
                    allList.add(alarmObject);
                }
            }
        }
        return allList;
    }

    private List<FlinkNodeField> analAllFlinkNodeField(Object allWorkMenus) {
        List<FlinkNodeField> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject parseObject = JSONObject.parseObject(o.toString());
                    FlinkNodeField jobNodeLayConfigDto = new FlinkNodeField();
                    Integer id = parseObject.getInteger("id");
                    Integer nodeId = parseObject.getInteger("nodeId");
                    String fieldName = parseObject.getString("fieldName");
                    String fieldType = parseObject.getString("fieldType");
                    String fieldAlias = parseObject.getString("fieldAlias");
                    String fieldDesc = parseObject.getString("fieldDesc");
                    Integer fieldOrder = parseObject.getInteger("fieldOrder");
                    String fieldExpression = parseObject.getString("fieldExpression");
                    Date createTime = parseObject.getDate("createTime");
                    Long createPer = parseObject.getLong("createPer");
                    Integer deleteFlag = parseObject.getInteger("deleteFlag");

                    jobNodeLayConfigDto.setId(id);
                    jobNodeLayConfigDto.setNodeId(nodeId);
                    jobNodeLayConfigDto.setFieldName(fieldName);
                    jobNodeLayConfigDto.setFieldType(fieldType);
                    jobNodeLayConfigDto.setFieldAlias(fieldAlias);
                    jobNodeLayConfigDto.setFieldDesc(fieldDesc);
                    jobNodeLayConfigDto.setCreateTime(createTime);
                    jobNodeLayConfigDto.setCreatePer(createPer);
                    jobNodeLayConfigDto.setFieldOrder(fieldOrder);
                    jobNodeLayConfigDto.setFieldExpression(fieldExpression);
                    jobNodeLayConfigDto.setDeleteFlag(deleteFlag);
                    allList.add(jobNodeLayConfigDto);
                }
            }
        }
        return allList;
    }

    private List<RealTimeTask> analAllRealTimeTask(Object allWorkMenus) {
        List<RealTimeTask> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allWorkMenus.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject objJobInfoDto = JSONObject.parseObject(o.toString());
                    RealTimeTask jobInfoDto = new RealTimeTask();
                    Integer id = objJobInfoDto.getInteger("id");
                    Integer menuId = objJobInfoDto.getInteger("menuId");
                    Integer taskType = objJobInfoDto.getInteger("taskType");
                    Integer resourceId = objJobInfoDto.getInteger("resourceId");
                    String mainFunction = objJobInfoDto.getString("mainFunction");
                    String mainArgs = objJobInfoDto.getString("mainArgs");
                    Integer parallelism = objJobInfoDto.getInteger("parallelism");
                    Integer jobManagerMemory = objJobInfoDto.getInteger("jobManagerMemory");
                    Integer taskManagerMemory = objJobInfoDto.getInteger("taskManagerMemory");
                    Integer slot = objJobInfoDto.getInteger("slot");
                    String savepointPath = objJobInfoDto.getString("savepointPath");
                    Integer runState = objJobInfoDto.getInteger("runState");
                    Integer lockState = objJobInfoDto.getInteger("lockState");
                    String applicationId = objJobInfoDto.getString("applicationId");
                    String jobId = objJobInfoDto.getString("jobId");
                    Date runTime = objJobInfoDto.getDate("runTime");
                    String flinkSQL = objJobInfoDto.getString("flinkSQL");
                    Integer runLogId = objJobInfoDto.getInteger("runLogId");

                    jobInfoDto.setId(id);
                    jobInfoDto.setMenuId(menuId);
                    jobInfoDto.setTaskType(taskType);
                    jobInfoDto.setResourceId(resourceId);
                    jobInfoDto.setMainFunction(mainFunction);
                    jobInfoDto.setMainArgs(mainArgs);
                    jobInfoDto.setParallelism(parallelism);
                    jobInfoDto.setJobManagerMemory(jobManagerMemory);
                    jobInfoDto.setTaskManagerMemory(taskManagerMemory);
                    jobInfoDto.setSlot(slot);
                    jobInfoDto.setSavepointPath(savepointPath);
                    jobInfoDto.setRunState(runState);
                    jobInfoDto.setLockState(lockState);
                    jobInfoDto.setApplicationId(applicationId);
                    jobInfoDto.setJobId(jobId);
                    jobInfoDto.setRunTime(runTime);
                    jobInfoDto.setFlinkSQL(flinkSQL);
                    jobInfoDto.setRunLogId(runLogId);
                    allList.add(jobInfoDto);
                }
            }
        }
        return allList;
    }

    private List<JobRunUdf> analAllJobRunUdfs(Object allJobRunUdfs) {
        List<JobRunUdf> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allJobRunUdfs.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    JobRunUdf jobRunUdf = new JobRunUdf();
                    jobRunUdf.setId(jsonObject.getInteger("id"));
                    jobRunUdf.setJarId(jsonObject.getInteger("jarId"));
                    jobRunUdf.setJarClassName(jsonObject.getString("jarClassName"));
                    jobRunUdf.setJarMethodName(jsonObject.getString("jarMethodName"));
                    jobRunUdf.setMethodName(jsonObject.getString("methodName"));
                    jobRunUdf.setDbName(jsonObject.getString("dbName"));
                    jobRunUdf.setIsAlreadyRegist(jsonObject.getInteger("isAlreadyRegist"));
                    jobRunUdf.setIsJarDelete(jsonObject.getInteger("isJarDelete"));
                    jobRunUdf.setCreaterPerId(jsonObject.getInteger("createrPerId"));
                    if (null != jsonObject.get("createTime")) {
                        jobRunUdf.setCreateTime(LocalDateTime.parse(jsonObject.get("createTime").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    jobRunUdf.setProcId(jsonObject.getInteger("procId"));
                    jobRunUdf.setIsUsable(jsonObject.getInteger("isUsable"));
                    jobRunUdf.setDesc(jsonObject.getString("desc"));
                    jobRunUdf.setCustomJarName(jsonObject.getString("customJarName"));
                    allList.add(jobRunUdf);
                }
            }
        }
        return allList;
    }

    private List<BdpUdfJarInfo> analAllUdfJarInfos(Object allUdfJarInfos) {
        List<BdpUdfJarInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allUdfJarInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    BdpUdfJarInfo bdpUdfJarInfo = new BdpUdfJarInfo();
                    bdpUdfJarInfo.setId(jsonObject.getInteger("id"));
                    bdpUdfJarInfo.setJarOriginName(jsonObject.getString("jarOriginName"));
                    if (null != jsonObject.get("updateTime")) {
                        bdpUdfJarInfo.setUpdateTime(LocalDateTime.parse(jsonObject.get("updateTime").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                    bdpUdfJarInfo.setJarName(jsonObject.getString("jarName"));
                    bdpUdfJarInfo.setProcId(jsonObject.getInteger("procId"));
                    allList.add(bdpUdfJarInfo);
                }
            }
        }
        return allList;
    }

    private List<ProcTable> analAllProcTables(Object allProcTables) {
        List<ProcTable> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allProcTables.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    ProcTable procTable = new ProcTable();
                    procTable.setProcId(jsonObject.getInteger("procId"));
                    procTable.setTableId(jsonObject.getInteger("tableId"));
                    allList.add(procTable);
                }
            }
        }
        return allList;
    }

    private List<TableFieldInfo> analAllTableFieldInfos(Object allTableFieldInfos) {
        List<TableFieldInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allTableFieldInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    TableFieldInfo tableFieldInfo = new TableFieldInfo();
                    tableFieldInfo.setId(jsonObject.getInteger("id"));
                    tableFieldInfo.setTableId(jsonObject.getInteger("tableId"));
                    tableFieldInfo.setFieldName(jsonObject.getString("fieldName"));
                    tableFieldInfo.setFieldType(jsonObject.getString("fieldType"));
                    tableFieldInfo.setFieldAlias(jsonObject.getString("fieldAlias"));
                    tableFieldInfo.setIsPartition(jsonObject.getInteger("isPartition"));
                    tableFieldInfo.setFieldOrder(jsonObject.getInteger("fieldOrder"));
                    tableFieldInfo.setColcumLevelId(jsonObject.getInteger("colcumLevelId"));
                    tableFieldInfo.setEncyStyleId(jsonObject.getInteger("encyStyleId"));
                    tableFieldInfo.setSecurityDataLevel(jsonObject.getString("securityDataLevel"));
                    tableFieldInfo.setCreatePer(jsonObject.getInteger("createPer"));
                    tableFieldInfo.setCreateTime(jsonObject.getDate("createTime"));
                    tableFieldInfo.setPrimaryKey(jsonObject.getInteger("primaryKey"));
                    allList.add(tableFieldInfo);
                }
            }
        }
        return allList;
    }

    private List<BdpRealTableField> analAllRealTableFieldInfos(Object allTableFieldInfos) {
        List<BdpRealTableField> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allTableFieldInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject1 = JSONObject.parseObject(o.toString());
                    BdpRealTableField tableFieldInfo = new BdpRealTableField();
                    Integer id1 = jsonObject1.getInteger("id");
                    Integer tableId = jsonObject1.getInteger("tableId");
                    String fieldName = jsonObject1.getString("fieldName");
                    String fieldType = jsonObject1.getString("fieldType");
                    String fieldTypeValue = jsonObject1.getString("fieldTypeValue");
                    String fieldAlias = jsonObject1.getString("fieldAlias");
                    String fieldDesc = jsonObject1.getString("fieldDesc");
                    Integer fieldOrder = jsonObject1.getInteger("fieldOrder");
                    Date createTime1 = jsonObject1.getDate("createTime");
                    Long createUser1 = jsonObject1.getLong("createUser");
                    Integer colcumLevelId = jsonObject1.getInteger("colcumLevelId");
                    String securityDataLevel1 = jsonObject1.getString("securityDataLevel");
                    Integer deleteFlag1 = jsonObject1.getInteger("deleteFlag");

                    tableFieldInfo.setId(id1);
                    tableFieldInfo.setTableId(tableId);
                    tableFieldInfo.setFieldName(fieldName);
                    tableFieldInfo.setFieldType(fieldType);
                    tableFieldInfo.setFieldTypeValue(fieldTypeValue);
                    tableFieldInfo.setFieldAlias(fieldAlias);
                    tableFieldInfo.setFieldDesc(fieldDesc);
                    tableFieldInfo.setFieldOrder(fieldOrder);
                    tableFieldInfo.setColcumLevelId(colcumLevelId);
                    tableFieldInfo.setSecurityDataLevel(securityDataLevel1);
                    tableFieldInfo.setCreateUser(createUser1);
                    tableFieldInfo.setCreateTime(createTime1);
                    tableFieldInfo.setTenantId(ShiroUtils.getTenantId());
                    tableFieldInfo.setDeleteFlag(deleteFlag1);
                    allList.add(tableFieldInfo);
                }
            }
        }
        return allList;
    }

    private List<TableInfo> analAllTableInfos(Object allTableInfos) {
        List<TableInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allTableInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    TableInfo tableInfo = new TableInfo();
                    tableInfo.setId(jsonObject.getInteger("id"));
                    tableInfo.setDbName(jsonObject.getString("dbName"));
                    tableInfo.setTableName(jsonObject.getString("tableName"));
                    tableInfo.setTableAlias(jsonObject.getString("tableAlias"));
                    tableInfo.setFormat(jsonObject.getString("format"));
                    tableInfo.setDelimitId(jsonObject.getInteger("delimitId"));
                    tableInfo.setDesc(jsonObject.getString("desc"));
                    tableInfo.setCreatePer(jsonObject.getInteger("createPer"));
                    tableInfo.setCreateTime(jsonObject.getDate("createTime"));
                    tableInfo.setTableLevelId(jsonObject.getInteger("tableLevelId"));
                    tableInfo.setRowsNum(jsonObject.getLong("rowsNum"));
                    tableInfo.setTotalSize(jsonObject.getDouble("totalSize"));
                    tableInfo.setLastCountTime(jsonObject.getDate("lastCountTime"));
                    tableInfo.setTableMaskOpen(jsonObject.getInteger("tableMaskOpen"));
                    tableInfo.setTableMaskWhiteList(jsonObject.getString("tableMaskWhiteList"));
                    tableInfo.setStoreEngine(jsonObject.getInteger("storeEngine"));
                    tableInfo.setLifeCycle(jsonObject.getInteger("lifeCycle"));
                    tableInfo.setLongLifeFlag(jsonObject.getInteger("longLifeFlag"));
                    tableInfo.setSecurityDataLevel(jsonObject.getString("securityDataLevel"));
                    tableInfo.setTenantId(jsonObject.getInteger("tenantId"));
                    allList.add(tableInfo);
                }
            }
        }
        return allList;
    }

    private List<BdpRealTableInfo> analAllRealTableInfos(Object allTableInfos) {
        List<BdpRealTableInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allTableInfos.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    Integer id = jsonObject.getInteger("id");
                    Integer resourceId = jsonObject.getInteger("resourceId");
                    String tableName = jsonObject.getString("tableName");
                    String dbName = jsonObject.getString("dbName");
                    String topicName = jsonObject.getString("topicName");
                    Integer delimitId = jsonObject.getInteger("delimitId");
                    String format = jsonObject.getString("format");
                    String tableDesc = jsonObject.getString("tableDesc");
                    String config = jsonObject.getString("config");
                    Integer viewNum = jsonObject.getInteger("viewNum");
                    Date createTime = jsonObject.getDate("createTime");
                    Long createUser = jsonObject.getLong("createUser");
                    Long updateUser = jsonObject.getLong("updateUser");
                    Date updateTime = jsonObject.getDate("updateTime");
                    Integer deleteFlag = jsonObject.getInteger("deleteFlag");
                    Integer tableType = jsonObject.getInteger("tableType");
                    Integer partitionFlag = jsonObject.getInteger("partitionFlag");
                    Integer partitionNum = jsonObject.getInteger("partitionNum");
                    Short duplicateNum = jsonObject.getShort("duplicateNum");
                    String securityDataLevel = jsonObject.getString("securityDataLevel");
                    Integer tableLevelId = jsonObject.getInteger("tableLevelId");
                    String createPerName = jsonObject.getString("createPerName");
                    BdpRealTableInfo tableInfo = new BdpRealTableInfo();
                    tableInfo.setId(id);
                    tableInfo.setResourceId(resourceId);
                    tableInfo.setTableName(tableName);
                    tableInfo.setDbName(dbName);
                    tableInfo.setTopicName(topicName);
                    tableInfo.setDelimitId(delimitId);
                    tableInfo.setFormat(format);
                    tableInfo.setTableDesc(tableDesc);
                    tableInfo.setConfig(config);
                    tableInfo.setViewNum(viewNum);
                    tableInfo.setCreateTime(createTime);
                    tableInfo.setCreateUser(createUser);
                    tableInfo.setUpdateUser(updateUser);
                    tableInfo.setUpdateTime(updateTime);
                    tableInfo.setDeleteFlag(deleteFlag);
                    tableInfo.setTableType(tableType);
                    tableInfo.setPartitionFlag(partitionFlag);
                    tableInfo.setPartitionNum(partitionNum);
                    tableInfo.setDuplicateNum(duplicateNum);
                    tableInfo.setSecurityDataLevel(securityDataLevel);
                    tableInfo.setTableLevelId(tableLevelId);
                    tableInfo.setTenantId(ShiroUtils.getTenantId());
                    tableInfo.setCreatePerName(createPerName);
                    allList.add(tableInfo);
                }
            }
        }
        return allList;
    }

    private List<SapConnectField> analAllSapConnectFields(Object allSapConnectFields) {
        List<SapConnectField> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allSapConnectFields.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    SapConnectField sapConnectField = new SapConnectField();
                    sapConnectField.setId(jsonObject.getInteger("id"));
                    sapConnectField.setConnectId(jsonObject.getInteger("connectId"));
                    sapConnectField.setRfcFunc(jsonObject.getString("rfcFunc"));
                    sapConnectField.setInputTableName(jsonObject.getString("inputTableName"));
                    sapConnectField.setOutputTableName(jsonObject.getString("outputTableName"));
                    sapConnectField.setInputParams(jsonObject.getString("inputParams"));
                    sapConnectField.setOutputParams(jsonObject.getString("outputParams"));
                    sapConnectField.setIsgroup(jsonObject.getInteger("isgroup"));
                    sapConnectField.setGroupName(jsonObject.getString("groupName"));
                    sapConnectField.setR3Name(jsonObject.getString("r3Name"));
                    sapConnectField.setSysnr(jsonObject.getString("sysnr"));
                    sapConnectField.setLang(jsonObject.getString("lang"));
                    allList.add(sapConnectField);
                }
            }
        }
        return allList;
    }

    private List<ProcConnect> analAllProcConnects(Object allProcConnects) {
        List<ProcConnect> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allProcConnects.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    ProcConnect procConnect = new ProcConnect();
                    procConnect.setProcId(jsonObject.getInteger("procId"));
                    procConnect.setConnectId(jsonObject.getInteger("connectId"));
                    allList.add(procConnect);
                }
            }
        }
        return allList;
    }

    private List<ConnectFieldInfo> analAllConfConnects(Object allConnectFields) {
        List<ConnectFieldInfo> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allConnectFields.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    ConnectFieldInfo connectFieldInfo = new ConnectFieldInfo();
                    connectFieldInfo.setId(jsonObject.getInteger("id"));
                    connectFieldInfo.setConnectId(jsonObject.getInteger("connectId"));
                    connectFieldInfo.setFieldName(jsonObject.getString("fieldName"));
                    connectFieldInfo.setFieldValue(jsonObject.getString("fieldValue"));
                    connectFieldInfo.setFieldAlias(jsonObject.getString("fieldAlias"));
                    connectFieldInfo.setFieldType(jsonObject.getInteger("fieldType"));
                    allList.add(connectFieldInfo);
                }
            }
        }
        return allList;
    }

    private List<ConfConnect> anAllConfConnects(Object allConfConnects) {
        List<ConfConnect> allList = new ArrayList<>();
        JSONArray jsonArray = JSONArray.parseArray(allConfConnects.toString());
        if(CollectionUtil.isNotEmpty(jsonArray)){
            for (Object o : jsonArray) {
                if(null != o){
                    JSONObject jsonObject = JSONObject.parseObject(o.toString());
                    ConfConnect confConnect = new ConfConnect();
                    confConnect.setId(jsonObject.getInteger("id"));
                    confConnect.setName(jsonObject.getString("name"));
                    confConnect.setTypeId(jsonObject.getInteger("typeId"));
                    confConnect.setHost(jsonObject.getString("host"));
                    confConnect.setInterfaceUrl(jsonObject.getString("interfaceUrl"));
                    confConnect.setKafkaUrl(jsonObject.getString("kafkaUrl"));
                    confConnect.setPort(jsonObject.getString("port"));
                    confConnect.setUsername(jsonObject.getString("username"));
                    confConnect.setPassword(jsonObject.getString("password"));
                    confConnect.setDbname(jsonObject.getString("dbname"));
                    confConnect.setDesc(jsonObject.getString("desc"));
                    confConnect.setRequestType(jsonObject.getInteger("requestType"));
                    confConnect.setTopic(jsonObject.getString("topic"));
                    confConnect.setFormat(jsonObject.getString("format"));
                    confConnect.setDelimitId(jsonObject.getInteger("delimitId"));
                    confConnect.setCode(jsonObject.getInteger("code"));
                    confConnect.setCreateTime(jsonObject.getDate("createTime"));
                    confConnect.setCreatePer(jsonObject.getInteger("createPer"));
                    confConnect.setModTime(jsonObject.getDate("modTime"));
                    confConnect.setModPer(jsonObject.getInteger("modPer"));
                    confConnect.setFtpFileLocation(jsonObject.getString("ftpFileLocation"));
                    confConnect.setWebServiceUrl(jsonObject.getString("webServiceUrl"));
                    confConnect.setTargetNameSpace(jsonObject.getString("targetNameSpace"));
                    confConnect.setFunctionName(jsonObject.getString("functionName"));
                    confConnect.setConnectStatus(jsonObject.getInteger("connectStatus"));
                    confConnect.setConnectEnable(jsonObject.getInteger("connectEnable"));
                    confConnect.setTenantId(jsonObject.getInteger("tenantId"));
                    allList.add(confConnect);
                }
            }
        }
        return allList;
    }

}
